avoir zoombie processes after kikk

This commit is contained in:
lxsang 2020-08-07 00:01:02 +02:00
parent 13b1d7fad2
commit 06fd912228
2 changed files with 6 additions and 0 deletions

Binary file not shown.

View File

@ -133,9 +133,15 @@ static void terminal_kill(int client_id, int should_delete)
{ {
M_ERROR(MODULE_NAME, "Unable to kill process %d: %s", proc->pid, strerror(errno)); M_ERROR(MODULE_NAME, "Unable to kill process %d: %s", proc->pid, strerror(errno));
} }
else
{
(void)waitpid(proc->pid, NULL, 0);
}
free(node->data); free(node->data);
if(should_delete) if(should_delete)
processes = bst_delete(processes, node->key); processes = bst_delete(processes, node->key);
// wait child
} }
} }
} }