diff options
Diffstat (limited to 'libbb/fflush_stdout_and_exit.c')
-rw-r--r-- | libbb/fflush_stdout_and_exit.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/libbb/fflush_stdout_and_exit.c b/libbb/fflush_stdout_and_exit.c index 9ad5dbf96..b4bed865f 100644 --- a/libbb/fflush_stdout_and_exit.c +++ b/libbb/fflush_stdout_and_exit.c | |||
@@ -15,15 +15,10 @@ | |||
15 | 15 | ||
16 | void FAST_FUNC fflush_stdout_and_exit(int retval) | 16 | void FAST_FUNC fflush_stdout_and_exit(int retval) |
17 | { | 17 | { |
18 | xfunc_error_retval = retval; | ||
18 | if (fflush(stdout)) | 19 | if (fflush(stdout)) |
19 | bb_perror_msg_and_die(bb_msg_standard_output); | 20 | bb_perror_msg_and_die(bb_msg_standard_output); |
20 | 21 | /* In case we are in NOFORK applet. Do not exit() directly, | |
21 | if (ENABLE_FEATURE_PREFER_APPLETS && die_sleep < 0) { | 22 | * but use xfunc_die() */ |
22 | /* We are in NOFORK applet. Do not exit() directly, | 23 | xfunc_die(); |
23 | * but use xfunc_die() */ | ||
24 | xfunc_error_retval = retval; | ||
25 | xfunc_die(); | ||
26 | } | ||
27 | |||
28 | exit(retval); | ||
29 | } | 24 | } |