Commit 47d6a70f authored by Ray Strode's avatar Ray Strode

Merge branch 'wip/rstrode/unblock-sigusr1' into 'master'

session-worker: unblock SIGUSR1 before PAM

Closes #399

See merge request !20
parents ec2f5a84 b0d1ca9e
......@@ -117,12 +117,19 @@ session_worker_job_setup_journal_fds (void)
static void
session_worker_job_child_setup (GdmSessionWorkerJob *session_worker_job)
{
sigset_t mask;
session_worker_job_setup_journal_fds ();
/* Terminate the process when the parent dies */
#ifdef HAVE_SYS_PRCTL_H
prctl (PR_SET_PDEATHSIG, SIGTERM);
#endif
/*
* Reset signal mask to default since it was altered by the
* manager process
*/
sigemptyset (&mask);
sigprocmask (SIG_SETMASK, &mask, NULL);
}
static void
......
......@@ -2026,8 +2026,6 @@ gdm_session_worker_start_session (GdmSessionWorker *worker,
char *home_dir;
int stdin_fd = -1, stdout_fd = -1, stderr_fd = -1;
gboolean has_journald = FALSE, needs_controlling_terminal = FALSE;
sigset_t mask;
/* Leak the TTY into the session as stdin so that it stays open
* without any races. */
if (worker->priv->session_tty_fd > 0) {
......@@ -2148,19 +2146,6 @@ gdm_session_worker_start_session (GdmSessionWorker *worker,
*/
signal (SIGPIPE, SIG_DFL);
/*
* Reset SIGUSR1 to default since it was blocked by the manager
* process for the X server startup handshake
*/
signal (SIGUSR1, SIG_DFL);
/*
* Reset signal mask to default since it was altered by the
* manager process
*/
sigemptyset (&mask);
sigprocmask (SIG_SETMASK, &mask, NULL);
gdm_session_execute (worker->priv->arguments[0],
worker->priv->arguments,
(char **)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment