Compare commits

...

3 Commits

Author SHA1 Message Date
Marcel Hollerbach 358b445c22 entrance_wait: kill server if session was killed. 7 years ago
Marcel Hollerbach cecdf152c7 entrance: Use PT instead of ERR 7 years ago
Marcel Hollerbach e8e04b73d1 entrance_wait: do not react on closed clients 7 years ago
  1. 2
      src/daemon/entrance_session.c
  2. 12
      src/daemon/entrance_wait.c

@ -194,7 +194,7 @@ _entrance_session_run(struct passwd *pwd, const char *cmd, const char *cookie)
}
else
{
ERR("Failed to start session");
PT("Failed to start session");
}
}

@ -18,8 +18,7 @@ static void
_entrance_wait_action(int sig, siginfo_t * si __UNUSED__, void *data __UNUSED__)
{
kill_wait();
if (sig != SIGCHLD)
setenv("ENTRANCE_QUIT", "1", 1);
setenv("ENTRANCE_QUIT", "1", 1);
}
static void
@ -48,7 +47,6 @@ main (int argc __UNUSED__, char **argv __UNUSED__)
action.sa_sigaction = _entrance_wait_action;
action.sa_flags = SA_RESTART | SA_SIGINFO;
sigemptyset(&action.sa_mask);
sigaction(SIGCHLD, &action, NULL);
sigaction(SIGQUIT, &action, NULL);
sigaction(SIGTERM, &action, NULL);
sigaction(SIGKILL, &action, NULL);
@ -64,9 +62,13 @@ main (int argc __UNUSED__, char **argv __UNUSED__)
if ((errno == ECHILD) || (errno == EINVAL))
return -1;
}
else if (rpid == _x_pid || rpid == spid)
else if (rpid == _x_pid)
{
break;
break;
}
else if (rpid == spid)
{
kill_wait();
}
}

Loading…
Cancel
Save