all: check stdout and stderr status at exit
If stream status is not checked at the end of execution below problem would not report error, or non-zero exit code. The uptime is just an example same was true with all commands of the project. $ uptime >&- ; echo $? uptime: write error: Bad file descriptor 1 $ uptime >/dev/full ; echo $? uptime: write error: No space left on device 1 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
@ -41,6 +41,7 @@
|
||||
#include <unistd.h>
|
||||
#include <values.h>
|
||||
|
||||
#include "../include/fileutils.h"
|
||||
#include "../include/nls.h"
|
||||
|
||||
#include "../proc/devname.h"
|
||||
@ -3902,6 +3903,7 @@ static void frame_make (void) {
|
||||
* duh... */
|
||||
int main (int dont_care_argc, char **argv) {
|
||||
(void)dont_care_argc;
|
||||
atexit(close_stdout);
|
||||
before(*argv);
|
||||
// +-------------+
|
||||
wins_stage_1(); // top (sic) slice
|
||||
|
Reference in New Issue
Block a user