- 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
|
pid_t
|
||||||
wait4(pid_t pid, int *status, int options, struct rusage *rusage) {
|
wait4(pid_t pid, int *status, int options, struct rusage *rusage) {
|
||||||
pid_t waitPid = waitpid(pid, status, options);
|
pid_t waitPid = waitpid(pid, status, options);
|
||||||
getrusage(RUSAGE_CHILDREN, rusage);
|
if (waitPid != -1) {
|
||||||
|
getrusage(RUSAGE_CHILDREN, rusage);
|
||||||
|
}
|
||||||
|
|
||||||
return waitPid;
|
return waitPid;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user