diff options
author | João Paulo Rechi Vita <jprvita@endlessm.com> | 2015-07-10 12:52:04 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2015-07-14 16:27:50 -0400 |
commit | 187180220ff6179419a2333c0cb1d57818f28854 (patch) | |
tree | 76dc2930674543efbfeef591ddfcd0bb7e351013 | |
parent | eee5bf72c9bb1c1d62eb0e7102088ae3b9a188cd (diff) | |
download | gdm-187180220ff6179419a2333c0cb1d57818f28854.tar.gz |
Make gdm-session-worker exit cleanly
Calling gdm_session_stop_conversation() in gdm_launch_environment_stop()
sends a SIGTERM to gdm-session-worker without waiting for it to die. The
next step is calling gdm_session_close() to close the session, which
stops all conversations of that session object, sending a 2nd SIGTERM to
gdm-session-worker, this time waiting on its PID.
On gdm-session-worker side, the first SIGTERM is caught by
on_shutdown_signal(), its custom SIGTERM handler, which quits the
mainloop and unrefs the worker object. Quiting the mainloop replaces the
custom SIGTERM handler with the system default one (exit immediately).
During the worker object class finalization gdm-session-worker may
receive the 2nd SIGTERM, which leads to its immediate termination,
without waiting for its children, which in turn leads to the main gdm
process exit.
Since systemd relies on the SIGCHLD from the main gdm process to tell
when the service has stopped, this behavior breaks any unit that has a
Conflicts=gdm.service entry and relies on the X server not being around
when it is started.
This commit removes the call to gdm_session_stop_conversation() in
gdm_launch_environment_stop() and leaves it to be stopped in
gdm_session_close().
[endlessm/eos-shell#4921]
https://bugzilla.gnome.org/show_bug.cgi?id=752388
-rw-r--r-- | daemon/gdm-launch-environment.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/daemon/gdm-launch-environment.c b/daemon/gdm-launch-environment.c index ec29d905..1beceea2 100644 --- a/daemon/gdm-launch-environment.c +++ b/daemon/gdm-launch-environment.c @@ -422,7 +422,6 @@ gdm_launch_environment_stop (GdmLaunchEnvironment *launch_environment) } if (launch_environment->priv->session != NULL) { - gdm_session_stop_conversation (launch_environment->priv->session, "gdm-launch-environment"); gdm_session_close (launch_environment->priv->session); g_clear_object (&launch_environment->priv->session); |