Compare commits

...

3 Commits

Author SHA1 Message Date
Marcel Hollerbach 358b445c22 entrance_wait: kill server if session was killed. 2015-08-03 14:02:54 +02:00
Marcel Hollerbach cecdf152c7 entrance: Use PT instead of ERR 2015-08-03 13:35:36 +02:00
Marcel Hollerbach e8e04b73d1 entrance_wait: do not react on closed clients 2015-08-03 13:22:05 +02:00
2 changed files with 8 additions and 6 deletions

View File

@ -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");
}
}

View File

@ -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();
}
}