mirror of
https://github.com/cage-kiosk/cage.git
synced 2025-10-29 05:40:19 -04:00
Cage: reset signal mask after forking
Cage uses wl_event_loop_add_signal to handle SIGINT and SIGTERM, which masks these signals. This means that the subprocess spawned by Cage start with these signals masked, which can lead to delays in Cage shutting down on e.g. ^C. Hence, we now unmask all signals between fork and exec. Fixes #40
This commit is contained in:
parent
76e8be14d9
commit
996f641cf0
1 changed files with 3 additions and 0 deletions
3
cage.c
3
cage.c
|
|
@ -48,6 +48,9 @@ spawn_primary_client(char *argv[], pid_t *pid_out)
|
|||
{
|
||||
pid_t pid = fork();
|
||||
if (pid == 0) {
|
||||
sigset_t set;
|
||||
sigemptyset(&set);
|
||||
sigprocmask(SIG_SETMASK, &set, NULL);
|
||||
execvp(argv[0], argv);
|
||||
_exit(1);
|
||||
} else if (pid == -1) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue