mirror of https://github.com/BOINC/boinc.git
- 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.
This commit is contained in:
parent
d0de3776bd
commit
be553882bd
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue