diff options
author | Chris Wilson <chris+github@qwirx.com> | 2007-12-15 17:03:41 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2007-12-15 17:03:41 +0000 |
commit | 5f468e8bb4c9c2c93ed035353593818ed755bf0e (patch) | |
tree | 6a1c2241252888a1d71949f4f6a8296a03edd97a | |
parent | d83236f4931ad0184d663ff91e411c071a3304c8 (diff) |
Report reason why killing a process failed.
-rw-r--r-- | lib/server/ServerControl.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/server/ServerControl.h b/lib/server/ServerControl.h index 50e1c816..ce5620c2 100644 --- a/lib/server/ServerControl.h +++ b/lib/server/ServerControl.h @@ -140,6 +140,11 @@ inline bool KillServerInternal(int pid) { if(pid == 0 || pid == -1) return false; bool killed = (::kill(pid, SIGTERM) == 0); + if (!killed) + { + BOX_ERROR("Failed to kill process " << pid << ": " << + strerror(errno)); + } TEST_THAT(killed); return killed; } |