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:
parent
7b6e8f3f1a
commit
0c5657e911
@ -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.
|
||||||
|
Loading…
Reference in New Issue
Block a user