mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-08 12:28:04 +02:00
weston-launch: Unblock our signalfd signals before execing child
Giovanni Campagna ran into this with mutter.
This commit is contained in:
parent
7adbbddee9
commit
c5c9571bec
1 changed files with 7 additions and 0 deletions
|
|
@ -532,6 +532,7 @@ main(int argc, char *argv[])
|
|||
char *tty = NULL, *new_user = NULL;
|
||||
char *term;
|
||||
int sleep_fork = 0;
|
||||
sigset_t mask;
|
||||
struct option opts[] = {
|
||||
{ "user", required_argument, NULL, 'u' },
|
||||
{ "tty", required_argument, NULL, 't' },
|
||||
|
|
@ -641,6 +642,12 @@ main(int argc, char *argv[])
|
|||
setuid(wl.pw->pw_uid) < 0)
|
||||
error(1, errno, "dropping privileges failed");
|
||||
|
||||
/* Do not give our signal mask to the new process. */
|
||||
sigemptyset(&mask);
|
||||
sigaddset(&mask, SIGTERM);
|
||||
sigaddset(&mask, SIGCHLD);
|
||||
sigaddset(&mask, SIGINT);
|
||||
sigprocmask(SIG_UNBLOCK, &mask, NULL);
|
||||
|
||||
if (sleep_fork) {
|
||||
if (wl.verbose)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue