diff options
Diffstat (limited to 'src/main/cpp/blaze_util_freebsd.cc')
-rw-r--r-- | src/main/cpp/blaze_util_freebsd.cc | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/main/cpp/blaze_util_freebsd.cc b/src/main/cpp/blaze_util_freebsd.cc index 213af024e5..4ff2278b54 100644 --- a/src/main/cpp/blaze_util_freebsd.cc +++ b/src/main/cpp/blaze_util_freebsd.cc @@ -152,16 +152,11 @@ void WriteSystemSpecificProcessIdentifier( const string& server_dir, pid_t server_pid) { } -bool VerifyServerProcess( - int pid, const string& output_base, const string& install_base) { - // TODO(lberki): This might accidentally kill an unrelated process if the - // server died and the PID got reused. - return true; -} - -bool KillServerProcess(int pid) { - killpg(pid, SIGKILL); - return true; +bool VerifyServerProcess(int pid, const string &output_base) { + // TODO(lberki): This only checks for the process's existence, not whether + // its start time matches. Therefore this might accidentally kill an + // unrelated process if the server died and the PID got reused. + return killpg(pid, 0) == 0; } // Not supported. |