- wrapper: use waitpid() instead of wait4(), which is missing on Android.

This commit is contained in:
David Anderson 2013-01-25 11:37:33 -08:00 committed by Oliver Bock
parent 2a73dc0e01
commit 6108deb7b0
1 changed files with 1 additions and 1 deletions

View File

@ -786,7 +786,7 @@ bool TASK::poll(int& status) {
int wpid; int wpid;
struct rusage ru; struct rusage ru;
wpid = wait4(pid, &status, WNOHANG, &ru); wpid = waitpid(pid, &status, WNOHANG);
if (wpid) { if (wpid) {
getrusage(RUSAGE_CHILDREN, &ru); getrusage(RUSAGE_CHILDREN, &ru);
final_cpu_time = (float)ru.ru_utime.tv_sec + ((float)ru.ru_utime.tv_usec)/1e+6; final_cpu_time = (float)ru.ru_utime.tv_sec + ((float)ru.ru_utime.tv_usec)/1e+6;