Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
b811b334
Commit
b811b334
authored
Apr 03, 2012
by
Premysl Hruby
Committed by
antirez
Apr 05, 2012
Browse files
in kill_server send the signal once, then wait for up to 5sec before sending lethal SIGKILL
parent
4d57e448
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/support/server.tcl
View file @
b811b334
...
@@ -46,11 +46,16 @@ proc kill_server config {
...
@@ -46,11 +46,16 @@ proc kill_server config {
}
}
# kill server and wait for the process to be totally exited
# kill server and wait for the process to be totally exited
catch
{
exec kill $pid
}
while
{[
is_alive $config
]}
{
while
{[
is_alive $config
]}
{
if
{[
incr wait 10
]
% 1000 == 0
}
{
incr wait 10
if
{
$wait
>= 5000
}
{
puts
"Forcing process
$pid
to exit..."
catch
{
exec kill -KILL $pid
}
}
elseif
{
$wait
% 1000 == 0
}
{
puts
"Waiting for process
$pid
to exit..."
puts
"Waiting for process
$pid
to exit..."
}
}
catch
{
exec kill $pid
}
after 10
after 10
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment