• João Paulo Rechi Vita's avatar
    Make gdm-session-worker exit cleanly · 18718022
    João Paulo Rechi Vita authored
    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
    18718022
Name
Last commit
Last update
common Loading commit data...
daemon Loading commit data...
data Loading commit data...
docs Loading commit data...
gui Loading commit data...
libgdm Loading commit data...
m4 Loading commit data...
po Loading commit data...
tests Loading commit data...
utils Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
ChangeLog Loading commit data...
HACKING Loading commit data...
MAINTAINERS Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
README Loading commit data...
TODO Loading commit data...
acconfig.h Loading commit data...
acinclude.m4 Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
gdm.doap Loading commit data...