diff --git a/dwl.c b/dwl.c index 5a31aee..79ccb34 100644 --- a/dwl.c +++ b/dwl.c @@ -674,7 +674,7 @@ cleanup(void) #endif wl_display_destroy_clients(dpy); if (child_pid > 0) { - kill(child_pid, SIGTERM); + kill(-child_pid, SIGTERM); waitpid(child_pid, NULL, 0); } wlr_xcursor_manager_destroy(cursor_mgr); @@ -2141,6 +2141,7 @@ run(char *startup_cmd) if ((child_pid = fork()) < 0) die("startup: fork:"); if (child_pid == 0) { + setsid(); dup2(piperw[0], STDIN_FILENO); close(piperw[0]); close(piperw[1]);