--- glibc-2.2.3/sysdeps/posix/wait3.c.orig Tue Jul 31 10:08:05 2001 +++ glibc-2.2.3/sysdeps/posix/wait3.c Tue Jul 31 10:29:29 2001 @@ -19,6 +19,7 @@ #include #include #include +#include #include /* Wait for a child to exit. When one does, put its status in *STAT_LOC and @@ -29,12 +30,17 @@ pid_t __wait3 (__WAIT_STATUS stat_loc, int options, struct rusage *usage) { + int err; + if (usage != NULL) { __set_errno (ENOSYS); return (pid_t) -1; } - return __waitpid (WAIT_ANY, stat_loc.__iptr, options); + err = __waitpid (WAIT_ANY, stat_loc.__iptr, options); + if (!err && usage) + err = getrusage (RUSAGE_CHILDREN, usage); + return err; } weak_alias (__wait3, wait3)