mirror of
https://github.com/MariaDB/server.git
synced 2026-05-06 23:25:34 +02:00
Merge branch '10.3' into bb-10.4-release
This commit is contained in:
commit
65e8506ca9
39 changed files with 312 additions and 78 deletions
|
|
@ -140,13 +140,20 @@ void handle_core(pid_t pid __attribute__((unused))) {}
|
|||
static int kill_child(bool was_killed)
|
||||
{
|
||||
int status= 0;
|
||||
pid_t ret_pid= 0;
|
||||
|
||||
message("Killing child: %d", child_pid);
|
||||
// Terminate whole process group
|
||||
if (! was_killed)
|
||||
kill(-child_pid, SIGKILL);
|
||||
{
|
||||
kill(-child_pid, SIGTERM);
|
||||
sleep(10); // will be interrupted by SIGCHLD
|
||||
if (!(ret_pid= waitpid(child_pid, &status, WNOHANG)))
|
||||
kill(-child_pid, SIGKILL);
|
||||
}
|
||||
|
||||
pid_t ret_pid= waitpid(child_pid, &status, 0);
|
||||
if (!ret_pid)
|
||||
ret_pid= waitpid(child_pid, &status, 0);
|
||||
if (ret_pid == child_pid)
|
||||
{
|
||||
int exit_code= 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue