Commit be553882 authored by David Anderson's avatar David Anderson Committed by Oliver Bock

- API: fix Unix bug when checking if client is alive based on PID.

    Can't use waitpid() here; works only for children.
    Use kill(pid, 0) instead.
parent d0de3776
......@@ -395,7 +395,8 @@ static bool client_dead() {
}
return true;
#else
return (waitpid(aid.client_pid, 0, WNOHANG) < 0);
int retval = kill(aid.client_pid, 0);
return (retval == -1 && errno == ESRCH);
#endif
} else {
return (interrupt_count > heartbeat_giveup_count);
......
......@@ -7928,3 +7928,11 @@ David 27 Dec 2012
client/
hostinfo_unix.cpp
hostinfo_unix_test.cpp
David 27 Dec 2012
- API: fix Unix bug when checking if client is alive based on PID.
Can't use waitpid() here; works only for children.
Use kill(pid, 0) instead.
api/
boinc_api.cpp
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment