]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Remove WNOHANG flag from wait3().
authorEd Schouten <ed@FreeBSD.org>
Fri, 30 Apr 2010 22:33:49 +0000 (22:33 +0000)
committerEd Schouten <ed@FreeBSD.org>
Fri, 30 Apr 2010 22:33:49 +0000 (22:33 +0000)
commite1e9ba3370d01ab5448943461a07d6d183a15bf1
tree09ce6a985c822526d2607a488f75f6372d41dfd3
parent7bec141b121da05bad35c061c1e9ab17f47c71d7
Remove WNOHANG flag from wait3().

Because script(1) now reliably terminates when the TTY is closed, it may
be the case that the call to wait3() occurs just before the child
process exits. This causes error codes to be ignored.

Just change script(1) to use waitpid() instead of wait3(). This makes it
more portable and prevents the need for a loop, since waitpid() only
returns a specified process.

PR: bin/146189
Tested by: amdmi3@, older version
MFC after: 2 weeks
usr.bin/script/script.c