Re: [gdm-list] (PATCH) Re: gdm hung after killing child




Simon:

Probably.  The patch is against 2.6 and not CVS head, but to get the
behavior that Simon wants he would have to do (TYPE_STATIC instead
of TYPE_LOCAL).

In the spirit of solving my own problems...

I have found that this is because when a gdm slave is killed, it shuts down the session and exits with DISPLAY_ABORT, which means the master drops that display.

Trying to kill the Xserver by killing the gdm slave process is not a
supported way of trying to kill the Xserver.  I think this patch
would overload the TERM/KILL handler in a way that is messy and
will cause the daemon to do unnecessary work when it is killed
normally via gdm-stop.

When the GDM daemon is killed via gdm-stop, it sends TERM signals to
any slaves that are running.  This is why the slaves abort their
sessions when they receive this signal.  No other process aside from
the daemon should be trying to send TERM/KILL signals to the slave
process.

The attached patch makes it exit with DISPLAY_REMANAGE for displays of type TYPE_LOCAL. Incidentally, this replicates xdm's behaviour when its slave is killed.

How does xdm differentiate being killed by its parent because the user
really wants to kill GDM and the slave being killed otherwise.

If this is not acceptable (why?) then I have an alternative patch that handles the HUP signal and exits with REMANAGE when it receives one of them.

I think enhancing the slave so it can handle a HUP signal to tell it
to restart itself is a better way of fixing this.

On a side note, the slave's global "d" variable is initialised after the signal handlers are installed, so there is a race condition if a signal arrives before gdm_slave_run (so if one arrives, then blech). It's very unlikely to happen, but why not just d = display or d = 0 earlier?

Do you mean the "GSList displays" global that gets set in gdm_config_parse a few lines after setting the signal handlers? I think
the "d" variable is grabbed out of this list, or am I missing something

Brian



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]