diff options
Diffstat (limited to 'src/main/cpp/blaze_util_darwin.cc')
-rw-r--r-- | src/main/cpp/blaze_util_darwin.cc | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/main/cpp/blaze_util_darwin.cc b/src/main/cpp/blaze_util_darwin.cc index 075b48a1e0..008b721e0a 100644 --- a/src/main/cpp/blaze_util_darwin.cc +++ b/src/main/cpp/blaze_util_darwin.cc @@ -196,16 +196,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; } // Sets a flag on path to exclude the path from Apple's automatic backup service |