aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/cpp/blaze_util_freebsd.cc
diff options
context:
space:
mode:
authorGravatar Lukacs Berki <lberki@google.com>2016-05-02 11:47:40 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2016-05-02 11:52:39 +0000
commit43e620bfcd20ea24f079b0aec5eacf2b0f6c8a4e (patch)
tree17512579b288f58cf1f3f101e5c44d225697c97f /src/main/cpp/blaze_util_freebsd.cc
parent29c4a950228a11201667c947f9843644e6a43145 (diff)
Linux-specific: check if the stray server process we are about to kill -9 is actually a server process.
This should be implemented for other OSes, too, but OS X seems to lack a procfs and it's not clear how to discover anything about a process based on its PID and of course, Windows is a wholly different cup of tea. More work for #930. -- MOS_MIGRATED_REVID=121262673
Diffstat (limited to 'src/main/cpp/blaze_util_freebsd.cc')
-rw-r--r--src/main/cpp/blaze_util_freebsd.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/cpp/blaze_util_freebsd.cc b/src/main/cpp/blaze_util_freebsd.cc
index 0b87a10299..448f525e13 100644
--- a/src/main/cpp/blaze_util_freebsd.cc
+++ b/src/main/cpp/blaze_util_freebsd.cc
@@ -154,4 +154,14 @@ string GetDefaultHostJavabase() {
return "/usr/local/openjdk8";
}
+void WriteSystemSpecificProcessIdentifier(const string& server_dir) {
+}
+
+void KillServerProcess(
+ 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.
+ killpg(pid, SIGKILL);
+}
+
} // namespace blaze