Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Commit

Permalink
Reset ignored signal handler in spawn() as well
Browse files Browse the repository at this point in the history
  • Loading branch information
djpohly authored and sevz17 committed Jun 16, 2023
1 parent df11b7a commit 9c592da
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dwl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9c592da

Please sign in to comment.