Commit 854e8b18 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-28976 fixup: A better fix

do_shutdown_server(): After sending SIGKILL, invoke wait_until_dead().
Thanks to Sergei Golubchik for pointing out that the previous fix
does not actually work.
parent 660afb1e
...@@ -5191,9 +5191,10 @@ void do_shutdown_server(struct st_command *command) ...@@ -5191,9 +5191,10 @@ void do_shutdown_server(struct st_command *command)
if (timeout) if (timeout)
(void) my_kill(pid, SIGABRT); (void) my_kill(pid, SIGABRT);
/* Give server a few seconds to die in all cases */ /* Give server a few seconds to die in all cases */
if (wait_until_dead(pid, timeout < 5 ? 5 : timeout)) if (!timeout || wait_until_dead(pid, timeout < 5 ? 5 : timeout))
{ {
(void) my_kill(pid, SIGKILL); (void) my_kill(pid, SIGKILL);
wait_until_dead(pid, 5);
} }
} }
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
......
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