hush: code shrink
function old new delta builtin_wait 347 328 -19 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
932302666b
commit
85378cded7
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user