mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-20 00:33:57 +00:00
Use waitpid, instead of wait3, which is more portable.
Submitted by: "Todd C. Miller" <Todd.Miller@courtesan.com> Obtained from: OpenBSD Reviewed by: tjr
This commit is contained in:
parent
815e414e17
commit
004bd28e40
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=116287
|
@ -543,8 +543,8 @@ waitchildren(const char *name, int waitall)
|
|||
pid_t pid;
|
||||
int status;
|
||||
|
||||
while ((pid = wait3(&status, !waitall && curprocs < maxprocs ?
|
||||
WNOHANG : 0, NULL)) > 0) {
|
||||
while ((pid = waitpid(-1, &status, !waitall && curprocs < maxprocs ?
|
||||
WNOHANG : 0)) > 0) {
|
||||
curprocs--;
|
||||
/* If we couldn't invoke the utility, exit. */
|
||||
if (childerr != 0) {
|
||||
|
|
Loading…
Reference in a new issue