Commit 239515bc authored by Pieter Noordhuis's avatar Pieter Noordhuis
Browse files

check for memory leaks before killing a server

parent 4fb6d00c
...@@ -10,6 +10,15 @@ proc error_and_quit {config_file error} { ...@@ -10,6 +10,15 @@ proc error_and_quit {config_file error} {
proc kill_server config { proc kill_server config {
set pid [dict get $config pid] set pid [dict get $config pid]
# check for leaks
catch {
if {[string match {*Darwin*} [exec uname -a]]} {
test {Check for memory leaks} {
exec leaks $pid
} {*0 leaks*}
}
}
# kill server and wait for the process to be totally exited # kill server and wait for the process to be totally exited
exec kill $pid exec kill $pid
while 1 { while 1 {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment