summaryrefslogtreecommitdiff
path: root/source3/web/startstop.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/web/startstop.c')
-rw-r--r--source3/web/startstop.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source3/web/startstop.c b/source3/web/startstop.c
index 19781cc220..e60b13ae66 100644
--- a/source3/web/startstop.c
+++ b/source3/web/startstop.c
@@ -91,3 +91,14 @@ void stop_nmbd(void)
kill(pid, SIGTERM);
}
+
+/* kill a specified process */
+void kill_pid(int pid)
+{
+ if (geteuid() != 0) return;
+
+ if (pid <= 0) return;
+
+ kill(pid, SIGTERM);
+ sleep(SLEEP_TIME);
+}