sleep: make it non-NOFORK. Fixes ^C in standalone shell
authorDenys Vlasenko <dvlasenk@redhat.com>
Tue, 14 Sep 2010 10:57:05 +0000 (12:57 +0200)
committerDenys Vlasenko <dvlasenk@redhat.com>
Tue, 14 Sep 2010 10:57:05 +0000 (12:57 +0200)
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
coreutils/sleep.c
include/applets.src.h

index b983df47e4dba434e83ad7546dd3d414906fd8df..12798d9a718fa38fc9af6ad5cfa840b9534890a0 100644 (file)
@@ -20,7 +20,7 @@
 
 #include "libbb.h"
 
-/* This is a NOFORK applet. Be very careful! */
+/* Do not make this applet NOFORK. It breaks ^C-ing of pauses in shells */
 
 
 #if ENABLE_FEATURE_FANCY_SLEEP || ENABLE_FEATURE_FLOAT_SLEEP
index 0e4f966de1d61e066a6628ffc266a5b6f29a8182..106b720775049641d5cecb4ed2d5420663611bbe 100644 (file)
@@ -345,7 +345,8 @@ IF_SHA256SUM(APPLET_ODDNAME(sha256sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_D
 IF_SHA512SUM(APPLET_ODDNAME(sha512sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_DROP, sha512sum))
 IF_SHOWKEY(APPLET(showkey, _BB_DIR_USR_BIN, _BB_SUID_DROP))
 IF_SLATTACH(APPLET(slattach, _BB_DIR_SBIN, _BB_SUID_DROP))
-IF_SLEEP(APPLET_NOFORK(sleep, sleep, _BB_DIR_BIN, _BB_SUID_DROP, sleep))
+/* Do not make this applet NOFORK. It breaks ^C-ing of pauses in shells */
+IF_SLEEP(APPLET(sleep, _BB_DIR_BIN, _BB_SUID_DROP))
 IF_SOFTLIMIT(APPLET_ODDNAME(softlimit, chpst, _BB_DIR_USR_BIN, _BB_SUID_DROP, softlimit))
 IF_SORT(APPLET_NOEXEC(sort, sort, _BB_DIR_USR_BIN, _BB_SUID_DROP, sort))
 IF_SPLIT(APPLET(split, _BB_DIR_USR_BIN, _BB_SUID_DROP))
@@ -358,7 +359,7 @@ IF_SULOGIN(APPLET(sulogin, _BB_DIR_SBIN, _BB_SUID_DROP))
 IF_SUM(APPLET(sum, _BB_DIR_USR_BIN, _BB_SUID_DROP))
 IF_SV(APPLET(sv, _BB_DIR_USR_BIN, _BB_SUID_DROP))
 IF_SVLOGD(APPLET(svlogd, _BB_DIR_USR_SBIN, _BB_SUID_DROP))
-IF_SWAPONOFF(APPLET_ODDNAME(swapoff, swap_on_off, _BB_DIR_SBIN, _BB_SUID_DROP,swapoff))
+IF_SWAPONOFF(APPLET_ODDNAME(swapoff, swap_on_off, _BB_DIR_SBIN, _BB_SUID_DROP, swapoff))
 IF_SWAPONOFF(APPLET_ODDNAME(swapon, swap_on_off, _BB_DIR_SBIN, _BB_SUID_DROP, swapon))
 IF_SWITCH_ROOT(APPLET(switch_root, _BB_DIR_SBIN, _BB_SUID_DROP))
 IF_SYNC(APPLET_NOFORK(sync, sync, _BB_DIR_BIN, _BB_SUID_DROP, sync))