diff options
author | Ron Yorston <rmy@pobox.com> | 2021-09-05 10:38:45 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2021-09-05 10:38:45 +0100 |
commit | a819ff097b754ec9ab0a6c8b64a43e0228369c7a (patch) | |
tree | bb765f3f9c0f392dcbe55c05cf621e2a4c46cb01 /shell | |
parent | 69c261f09e844e5b7434531614a91c30e40925da (diff) | |
download | busybox-w32-a819ff097b754ec9ab0a6c8b64a43e0228369c7a.tar.gz busybox-w32-a819ff097b754ec9ab0a6c8b64a43e0228369c7a.tar.bz2 busybox-w32-a819ff097b754ec9ab0a6c8b64a43e0228369c7a.zip |
ash: omit handling of stopped jobs
Since Windows doesn't really know about stopped jobs don't bother
to compile some code that deals with them.
Saves 120 bytes.
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c index c9eaaf52a..279cc8ed4 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -24,7 +24,8 @@ | |||
24 | * - command without ".exe" extension is still understood as executable | 24 | * - command without ".exe" extension is still understood as executable |
25 | * - shell scripts on the path are detected by the presence of '#!' | 25 | * - shell scripts on the path are detected by the presence of '#!' |
26 | * - both / and \ are supported in PATH. Usually you must use / | 26 | * - both / and \ are supported in PATH. Usually you must use / |
27 | * - trap/job does not work | 27 | * - job control doesn't work |
28 | * - trap doesn't work for signals, only EXIT | ||
28 | * - /dev/null is supported for redirection | 29 | * - /dev/null is supported for redirection |
29 | * - fake $PPID | 30 | * - fake $PPID |
30 | */ | 31 | */ |
@@ -514,7 +515,9 @@ struct jmploc { | |||
514 | struct globals_misc { | 515 | struct globals_misc { |
515 | uint8_t exitstatus; /* exit status of last command */ | 516 | uint8_t exitstatus; /* exit status of last command */ |
516 | uint8_t back_exitstatus;/* exit status of backquoted command */ | 517 | uint8_t back_exitstatus;/* exit status of backquoted command */ |
518 | #if !ENABLE_PLATFORM_MINGW32 | ||
517 | smallint job_warning; /* user was warned about stopped jobs (can be 2, 1 or 0). */ | 519 | smallint job_warning; /* user was warned about stopped jobs (can be 2, 1 or 0). */ |
520 | #endif | ||
518 | int savestatus; /* exit status of last command outside traps */ | 521 | int savestatus; /* exit status of last command outside traps */ |
519 | int rootpid; /* pid of main shell */ | 522 | int rootpid; /* pid of main shell */ |
520 | /* shell level: 0 for the main shell, 1 for its children, and so on */ | 523 | /* shell level: 0 for the main shell, 1 for its children, and so on */ |
@@ -5997,6 +6000,7 @@ waitforjob(struct job *jp) | |||
5997 | /* | 6000 | /* |
5998 | * return 1 if there are stopped jobs, otherwise 0 | 6001 | * return 1 if there are stopped jobs, otherwise 0 |
5999 | */ | 6002 | */ |
6003 | #if !ENABLE_PLATFORM_MINGW32 | ||
6000 | static int | 6004 | static int |
6001 | stoppedjobs(void) | 6005 | stoppedjobs(void) |
6002 | { | 6006 | { |
@@ -6015,6 +6019,9 @@ stoppedjobs(void) | |||
6015 | out: | 6019 | out: |
6016 | return retval; | 6020 | return retval; |
6017 | } | 6021 | } |
6022 | #else | ||
6023 | # define stoppedjobs() 0 | ||
6024 | #endif | ||
6018 | 6025 | ||
6019 | 6026 | ||
6020 | /* | 6027 | /* |
@@ -14337,8 +14344,10 @@ cmdloop(int top) | |||
14337 | } else if (nflag == 0) { | 14344 | } else if (nflag == 0) { |
14338 | int i; | 14345 | int i; |
14339 | 14346 | ||
14347 | #if !ENABLE_PLATFORM_MINGW32 | ||
14340 | /* job_warning can only be 2,1,0. Here 2->1, 1/0->0 */ | 14348 | /* job_warning can only be 2,1,0. Here 2->1, 1/0->0 */ |
14341 | job_warning >>= 1; | 14349 | job_warning >>= 1; |
14350 | #endif | ||
14342 | numeof = 0; | 14351 | numeof = 0; |
14343 | i = evaltree(n, 0); | 14352 | i = evaltree(n, 0); |
14344 | if (n) | 14353 | if (n) |