Skip to content

Commit

Permalink
block: restore signal mask in child processes
Browse files Browse the repository at this point in the history
Now that the original signal mask from the parent process is stored
in bar->sigset, use it to restore the signal set in child processes
instead of unblocking them all.

Refs #454
Closes #455
  • Loading branch information
vivien committed Jan 13, 2023
1 parent 9722880 commit f6f76e2
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions block.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,15 +261,7 @@ void block_touch(struct block *block)

static int block_child_sig(struct block *block)
{
sigset_t set;
int err;

/* It'd be safe to assume that all signals are unblocked by default */
err = sys_sigfillset(&set);
if (err)
return err;

return sys_sigunblock(&set);
return sys_sigsetmask(&block->bar->sigset, NULL);
}

static int block_child_stdin(struct block *block)
Expand Down

0 comments on commit f6f76e2

Please sign in to comment.