- Only try to get usage info if there was no error with waitpid.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34092 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Bruno G. Albuquerque 2009-11-17 16:00:10 +00:00
parent ada17216f9
commit 9306738deb

View File

@ -19,7 +19,9 @@ wait3(int *status, int options, struct rusage *rusage) {
pid_t
wait4(pid_t pid, int *status, int options, struct rusage *rusage) {
pid_t waitPid = waitpid(pid, status, options);
getrusage(RUSAGE_CHILDREN, rusage);
if (waitPid != -1) {
getrusage(RUSAGE_CHILDREN, rusage);
}
return waitPid;
}