diff options
author | jmallett <jmallett@FreeBSD.org> | 2003-06-13 07:37:45 +0000 |
---|---|---|
committer | jmallett <jmallett@FreeBSD.org> | 2003-06-13 07:37:45 +0000 |
commit | d187b499cb67c72f9add0b75af57e6b9f0f35528 (patch) | |
tree | 0543993dd3bfbb8db69f53592f2a58d043743003 /usr.bin/xargs | |
parent | fc99696af34b5e22298b1980f0b59e032e74ea35 (diff) | |
download | FreeBSD-src-d187b499cb67c72f9add0b75af57e6b9f0f35528.zip FreeBSD-src-d187b499cb67c72f9add0b75af57e6b9f0f35528.tar.gz |
Use waitpid, instead of wait3, which is more portable.
Submitted by: "Todd C. Miller" <Todd.Miller@courtesan.com>
Obtained from: OpenBSD
Reviewed by: tjr
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 833baa8..77f08eb 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) { |