- 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:
parent
ada17216f9
commit
9306738deb
@ -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);
|
||||
if (waitPid != -1) {
|
||||
getrusage(RUSAGE_CHILDREN, rusage);
|
||||
}
|
||||
|
||||
return waitPid;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user