Reset ignored signal handler in spawn() as well

This commit is contained in:
Devin J. Pohly 2023-06-15 23:57:16 -05:00 committed by Leonardo Hernández
parent df11b7a786
commit 9c592da01f

3
dwl.c
View file

@ -2327,6 +2327,9 @@ void
spawn(const Arg *arg)
{
if (fork() == 0) {
struct sigaction sa = {.sa_flags = SA_RESTART, .sa_handler = SIG_DFL};
sigemptyset(&sa.sa_mask);
sigaction(SIGCHLD, &sa, NULL);
dup2(STDERR_FILENO, STDOUT_FILENO);
setsid();
execvp(((char **)arg->v)[0], (char **)arg->v);