aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)
9120 return EXIT_FAILURE; 9120 return EXIT_FAILURE;
9121 } 9121 }
9122 if (waitpid(pid, &status, 0) == pid) { 9122 if (waitpid(pid, &status, 0) == pid) {
9123 ret = WEXITSTATUS(status);
9123 if (WIFSIGNALED(status)) 9124 if (WIFSIGNALED(status))
9124 ret = 128 + WTERMSIG(status); 9125 ret = 128 + WTERMSIG(status);
9125 else if (WIFEXITED(status))
9126 ret = WEXITSTATUS(status);
9127 else /* wtf? */
9128 ret = EXIT_FAILURE;
9129 } else { 9126 } else {
9130 bb_perror_msg("wait %s", *argv); 9127 bb_perror_msg("wait %s", *argv);
9131 ret = 127; 9128 ret = 127;