diff --git a/vterm/vterm b/vterm/vterm index f66463f..a6ca79b 100755 Binary files a/vterm/vterm and b/vterm/vterm differ diff --git a/vterm/vterm.c b/vterm/vterm.c index bd0cef6..abc87f9 100644 --- a/vterm/vterm.c +++ b/vterm/vterm.c @@ -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)); } + else + { + (void)waitpid(proc->pid, NULL, 0); + } free(node->data); if(should_delete) processes = bst_delete(processes, node->key); + // wait child + } } }