From 004bd28e408bc0fe10468514bcf2225c6a813185 Mon Sep 17 00:00:00 2001 From: Juli Mallett Date: Fri, 13 Jun 2003 07:37:45 +0000 Subject: [PATCH] Use waitpid, instead of wait3, which is more portable. Submitted by: "Todd C. Miller" Obtained from: OpenBSD Reviewed by: tjr --- usr.bin/xargs/xargs.c | 4 ++-- 1 file 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) {