← Commit list

0c5657e91

Denys Vlasenko
Denys Vlasenko
2017-07-14
SUCCESS Duration: 143s

Subject

hush: remove superfluous comparison

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

shell/hush.c+1 -1
@@ -9967,7 +9967,7 @@ static int FAST_FUNC builtin_wait(char **argv)
/* No */
ret = 127;
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:
* (sleep 1; exit 3) & sleep 2; echo $?; wait $!; echo $?
* In bash it prints exitcode 0, then 3.