Diff of /trunk/mkinitrd-magellan/busybox/libbb/fflush_stdout_and_exit.c
Parent Directory | Revision Log | Patch
revision 815 by niro, Sat Sep 1 22:45:15 2007 UTC | revision 816 by niro, Fri Apr 24 18:33:46 2009 UTC | |
---|---|---|
# | Line 13 | Line 13 |
13 | ||
14 | #include "libbb.h" | #include "libbb.h" |
15 | ||
16 | void fflush_stdout_and_exit(int retval) | void FAST_FUNC fflush_stdout_and_exit(int retval) |
17 | { | { |
18 | if (fflush(stdout)) | if (fflush(stdout)) |
19 | sleep_and_die(); | bb_perror_msg_and_die(bb_msg_standard_output); |
20 | ||
21 | if (ENABLE_FEATURE_PREFER_APPLETS && die_sleep < 0) { | |
22 | /* We are in NOFORK applet. Do not exit() directly, | |
23 | * but use xfunc_die() */ | |
24 | xfunc_error_retval = retval; | |
25 | xfunc_die(); | |
26 | } | |
27 | ||
28 | exit(retval); | exit(retval); |
29 | } | } |
|