client: attempt to get a more useful error message from kill_app_process() on non-Windows platforms.

This commit is contained in:
Charlie Fenton 2014-07-24 01:06:43 -07:00
parent f014b0d6da
commit 99daa41445
1 changed files with 3 additions and 2 deletions

View File

@ -224,7 +224,7 @@ static void kill_app_process(int pid, bool) {
if (retval && log_flags.task_debug) {
msg_printf(0, MSG_INFO,
"[task] kill_via_switcher() failed: %s",
boincerror(retval)
(retval==-1) ? strerror(errno) : boincerror(retval)
);
}
#endif
@ -232,7 +232,7 @@ static void kill_app_process(int pid, bool) {
if (retval && log_flags.task_debug) {
msg_printf(0, MSG_INFO,
"[task] kill() failed: %s",
boincerror(retval)
(retval==-1) ? strerror(errno) : boincerror(retval)
);
}
}
@ -268,6 +268,7 @@ int ACTIVE_TASK::kill_running_task(bool will_restart) {
int ACTIVE_TASK::kill_exited_task() {
kill_processes(other_pids, true);
kill_processes(descendants, true);
return 0;
}
// We have sent a quit request to the process; see if it's exited.