From 99912ca733dd960f5589227fd999c86e73c8e894 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Tue, 10 Apr 2007 15:43:37 +0000 Subject: audit small applets and mark some of them as NOFORK. Put big scary warnings in relevant places. --- coreutils/basename.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'coreutils/basename.c') diff --git a/coreutils/basename.c b/coreutils/basename.c index 46f7122c8..f4307d6ce 100644 --- a/coreutils/basename.c +++ b/coreutils/basename.c @@ -20,11 +20,10 @@ * 3) Save some space by using strcmp(). Calling strncmp() here was silly. */ -#include -#include -#include #include "busybox.h" +/* This is a NOFORK applet. Be very careful! */ + int basename_main(int argc, char **argv); int basename_main(int argc, char **argv) { @@ -47,5 +46,5 @@ int basename_main(int argc, char **argv) puts(s); - fflush_stdout_and_exit(EXIT_SUCCESS); + return fflush(stdout); } -- cgit v1.2.3