diff options
-rw-r--r-- | include/libbb.h | 3 | ||||
-rw-r--r-- | libbb/appletlib.c | 16 | ||||
-rw-r--r-- | shell/ash.c | 10 |
3 files changed, 1 insertions, 28 deletions
diff --git a/include/libbb.h b/include/libbb.h index 6073cbf4a..c95f43954 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -1150,9 +1150,6 @@ void set_task_comm(const char *comm) FAST_FUNC; | |||
1150 | #else | 1150 | #else |
1151 | # define set_task_comm(name) ((void)0) | 1151 | # define set_task_comm(name) ((void)0) |
1152 | #endif | 1152 | #endif |
1153 | #if ENABLE_PLATFORM_MINGW32 && ENABLE_FEATURE_SH_NOFORK | ||
1154 | extern int long_running_applet(int applet_no) FAST_FUNC; | ||
1155 | #endif | ||
1156 | 1153 | ||
1157 | /* Helpers for daemonization. | 1154 | /* Helpers for daemonization. |
1158 | * | 1155 | * |
diff --git a/libbb/appletlib.c b/libbb/appletlib.c index 6330b6f8b..71ee0dd07 100644 --- a/libbb/appletlib.c +++ b/libbb/appletlib.c | |||
@@ -302,22 +302,6 @@ int FAST_FUNC find_applet_by_name(const char *name) | |||
302 | #endif | 302 | #endif |
303 | } | 303 | } |
304 | 304 | ||
305 | # if ENABLE_PLATFORM_MINGW32 && ENABLE_FEATURE_SH_NOFORK | ||
306 | int FAST_FUNC long_running_applet(int applet_no) | ||
307 | { | ||
308 | int ret = 0; | ||
309 | |||
310 | #if defined(APPLET_NO_seq) | ||
311 | ret |= (applet_no == APPLET_NO_seq); | ||
312 | #endif | ||
313 | #if defined(APPLET_NO_yes) | ||
314 | ret |= (applet_no == APPLET_NO_yes); | ||
315 | #endif | ||
316 | |||
317 | return ret; | ||
318 | } | ||
319 | #endif | ||
320 | |||
321 | 305 | ||
322 | void lbb_prepare(const char *applet | 306 | void lbb_prepare(const char *applet |
323 | IF_FEATURE_INDIVIDUAL(, char **argv)) | 307 | IF_FEATURE_INDIVIDUAL(, char **argv)) |
diff --git a/shell/ash.c b/shell/ash.c index ac1ae05fc..af0c68dcf 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -10394,15 +10394,7 @@ evalcommand(union node *cmd, int flags) | |||
10394 | */ | 10394 | */ |
10395 | /* find_command() encodes applet_no as (-2 - applet_no) */ | 10395 | /* find_command() encodes applet_no as (-2 - applet_no) */ |
10396 | int applet_no = (- cmdentry.u.index - 2); | 10396 | int applet_no = (- cmdentry.u.index - 2); |
10397 | if (applet_no >= 0 && APPLET_IS_NOFORK(applet_no) | 10397 | if (applet_no >= 0 && APPLET_IS_NOFORK(applet_no)) { |
10398 | #if ENABLE_PLATFORM_MINGW32 | ||
10399 | /* | ||
10400 | * Fork long-running nofork applets (e.g. yes) in interactive | ||
10401 | * sessions. Otherwise ctrl-c won't let the user kill them. | ||
10402 | */ | ||
10403 | && !(iflag && long_running_applet(applet_no)) | ||
10404 | #endif | ||
10405 | ) { | ||
10406 | listsetvar(varlist.list, VEXPORT|VSTACK); | 10398 | listsetvar(varlist.list, VEXPORT|VSTACK); |
10407 | /* | 10399 | /* |
10408 | * Run <applet>_main(). | 10400 | * Run <applet>_main(). |