if (seat)
{
Session *active_session;
- active_session = seat_get_expected_active_session (seat);
- if (g_strcmp0 (login1_session_id, session_get_login1_session_id (active_session)) == 0)
+ active_session = seat_get_expected_active_session (seat);
+ if (active_session != NULL &&
+ g_strcmp0 (login1_session_id, session_get_login1_session_id (active_session)) == 0)
{
// Session is already active
g_debug ("Session %s is already active", login1_session_id);
};
GError *error = NULL;
+ /* Disable the SIGPIPE handler - this is a stupid Unix hangover behaviour.
+ * We will handle piples / sockets being closed instead of having the whole daemon be killed...
+ * http://stackoverflow.com/questions/8369506/why-does-sigpipe-exist
+ */
+ signal (SIGPIPE, SIG_IGN);
+
/* When lightdm starts sessions it needs to run itself in a new mode */
if (argc >= 2 && strcmp (argv[1], "--session-child") == 0)
return session_child_run (argc, argv);