Commit fix sent by Tor Egge <Tor.Egge@cvsup.no.freebsd.org>
Only use return value from system call if system call succeeded. Tested with `make world` and some of my own scripts. This should be MFCed soon. While /bin/sh is hard to test the fix is obviously correct and can be assumed not to break something else (famous last words...).
This commit is contained in:
parent
b6bc039460
commit
6a8fae4553
@ -926,7 +926,7 @@ dowait(int block, struct job *job)
|
||||
pid = waitproc(block, &status);
|
||||
TRACE(("wait returns %d, status=%d\n", (int)pid, status));
|
||||
} while ((pid == -1 && errno == EINTR && breakwaitcmd == 0) ||
|
||||
(WIFSTOPPED(status) && !iflag));
|
||||
(pid > 0 && WIFSTOPPED(status) && !iflag));
|
||||
in_dowait--;
|
||||
if (breakwaitcmd != 0) {
|
||||
breakwaitcmd = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user