diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-03-15 02:37:52 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-03-15 02:37:52 +0000 |
commit | d360320618fe3a7f53ac1f05ee3ac54323a03c82 (patch) | |
tree | 97120a8949d82c8e9aab435bb56f6f0301beed28 /source3/web/startstop.c | |
parent | 69bb6f6f5fa472d2bf5c619a09aecc3b0ce4c254 (diff) | |
download | samba-d360320618fe3a7f53ac1f05ee3ac54323a03c82.tar.gz |
- added the ability to kill off individual connections from SWAT (from
the status page)
- split the claim_connection() code into its own file
- fixed the claim_connection() code to lock the file when manipulating
it
- always claim a null connection at startup
- fixed a bug in the pidfile code
(This used to be commit abd4a17e21d12be3d1747e94ceb1915abaf135e3)
Diffstat (limited to 'source3/web/startstop.c')
-rw-r--r-- | source3/web/startstop.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source3/web/startstop.c b/source3/web/startstop.c index 19781cc2200..e60b13ae669 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); +} |