hush: remove superfluous comparison

function                                             old     new   delta
builtin_wait                                         291     285      -6

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2017-07-14 19:27:03 +02:00
parent 7b6e8f3f1a
commit 0c5657e911

View File

@ -9967,7 +9967,7 @@ static int FAST_FUNC builtin_wait(char **argv)
/* No */ /* No */
ret = 127; ret = 127;
if (errno == ECHILD) { if (errno == ECHILD) {
if (G.last_bg_pid > 0 && pid == G.last_bg_pid) { if (pid == G.last_bg_pid) {
/* "wait $!" but last bg task has already exited. Try: /* "wait $!" but last bg task has already exited. Try:
* (sleep 1; exit 3) & sleep 2; echo $?; wait $!; echo $? * (sleep 1; exit 3) & sleep 2; echo $?; wait $!; echo $?
* In bash it prints exitcode 0, then 3. * In bash it prints exitcode 0, then 3.