aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorGravatar Denys Vlasenko <vda.linux@googlemail.com>2015-10-11 21:47:11 +0200
committerGravatar Denys Vlasenko <vda.linux@googlemail.com>2015-10-11 21:47:11 +0200
commit85378cded7d088cbd048f6e6e127846f489d1fca (patch)
tree3f65a3f64f736f365ba5ffb5b5d03ad80d8b2952 /shell
parent932302666b0354ede63504d1bef8393cab28db8b (diff)
downloadbusybox-85378cded7d088cbd048f6e6e127846f489d1fca.tar.gz
busybox-85378cded7d088cbd048f6e6e127846f489d1fca.tar.bz2
hush: code shrink
function old new delta builtin_wait 347 328 -19 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
-rw-r--r--shell/hush.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/shell/hush.c b/shell/hush.c
index 0d107715f..eabe83ac6 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -9120,12 +9120,9 @@ static int FAST_FUNC builtin_wait(char **argv)
return EXIT_FAILURE;
}
if (waitpid(pid, &status, 0) == pid) {
+ ret = WEXITSTATUS(status);
if (WIFSIGNALED(status))
ret = 128 + WTERMSIG(status);
- else if (WIFEXITED(status))
- ret = WEXITSTATUS(status);
- else /* wtf? */
- ret = EXIT_FAILURE;
} else {
bb_perror_msg("wait %s", *argv);
ret = 127;