aboutsummaryrefslogtreecommitdiff
path: root/libbb/fflush_stdout_and_exit.c
diff options
context:
space:
mode:
authorGravatar Denis Vlasenko <vda.linux@googlemail.com>2007-04-10 15:43:37 +0000
committerGravatar Denis Vlasenko <vda.linux@googlemail.com>2007-04-10 15:43:37 +0000
commit99912ca733dd960f5589227fd999c86e73c8e894 (patch)
tree9df947fc08884d498cf76a02204d74b121064134 /libbb/fflush_stdout_and_exit.c
parentff131b980d524a33d8a43cefe65e14f64a43f2da (diff)
downloadbusybox-99912ca733dd960f5589227fd999c86e73c8e894.tar.gz
busybox-99912ca733dd960f5589227fd999c86e73c8e894.tar.bz2
audit small applets and mark some of them as NOFORK.
Put big scary warnings in relevant places.
Diffstat (limited to 'libbb/fflush_stdout_and_exit.c')
-rw-r--r--libbb/fflush_stdout_and_exit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libbb/fflush_stdout_and_exit.c b/libbb/fflush_stdout_and_exit.c
index 6f44770c6..ae68222b4 100644
--- a/libbb/fflush_stdout_and_exit.c
+++ b/libbb/fflush_stdout_and_exit.c
@@ -13,6 +13,10 @@
#include "libbb.h"
+// TODO: make it safe to call from NOFORK applets
+// Currently, it can exit(0). Even if it is made to do longjmp trick
+// (see sleep_and_die internals), zero cannot be passed thru this way!
+
void fflush_stdout_and_exit(int retval)
{
if (fflush(stdout))