diff options
author | Juli Mallett <jmallett@FreeBSD.org> | 2003-06-13 07:37:45 +0000 |
---|---|---|
committer | Juli Mallett <jmallett@FreeBSD.org> | 2003-06-13 07:37:45 +0000 |
commit | 004bd28e408bc0fe10468514bcf2225c6a813185 (patch) | |
tree | 0543993dd3bfbb8db69f53592f2a58d043743003 /usr.bin/xargs | |
parent | 815e414e17bce6a296c724b4f4ca7a9113614b08 (diff) | |
download | src-004bd28e408bc0fe10468514bcf2225c6a813185.tar.gz src-004bd28e408bc0fe10468514bcf2225c6a813185.zip |
Use waitpid, instead of wait3, which is more portable.
Submitted by: "Todd C. Miller" <Todd.Miller@courtesan.com>
Obtained from: OpenBSD
Reviewed by: tjr
Notes
Notes:
svn path=/head/; revision=116287
Diffstat (limited to 'usr.bin/xargs')
-rw-r--r-- | usr.bin/xargs/xargs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/xargs/xargs.c b/usr.bin/xargs/xargs.c index 833baa861e29..77f08ebd4124 100644 --- a/usr.bin/xargs/xargs.c +++ b/usr.bin/xargs/xargs.c @@ -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) { |