[pkg-fso-maint] Bug#531869: Bug#531869: Bug#531869: nodm can't be stopped by init.d script

Enrico Zini enrico at enricozini.org
Mon Jul 6 11:23:18 UTC 2009


On Mon, Jul 06, 2009 at 12:56:10AM +0200, Enrico Zini wrote:

> What seems needed here is to have the supervisor to detect that the
> child has been killed with signal 15, and in that case just quit.
> 
> It should be easy enough to do, and quite ok because if I kill, for
> example, matchbox, nodm/xsession won't exit as killed with signal 15 and
> so the nodm/supervisor will properly restart it as it should.

Unfortunately, when the session ends xinit does not return the exit code
of the session command, but it just returns 0.

I don't see a way for the monitor part of nodm to detect that the
session part of nodm has been killed with signal 15, unless I trap it in
the session part and write a note on a file, which is something that
would create more trouble than it would solve, because then there needs
to be extra machinery to detect stale files.

Alternatively, I can just ignore signals in the session part, so that if
you do "killall nodm" you will not activate the session but only the
monitor, as you would expect.

The current session code is inherited from su and does several things
with signals, like forwarding of SIGSTOP and SIGCONT, but the more I
look into it, the more I find it unnecessary and I can just block
everything. However, I still need one unblocked signal that the monitor
can use to tell the session to exit: SIGTERM would have been the obvious
choice, but if "killall nodm" is the use case, then we are back to
square one.


Ciao,

Enrico

-- 
GPG key: 4096R/E7AD5568 2009-05-08 Enrico Zini <enrico at enricozini.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-fso-maint/attachments/20090706/e9849ddc/attachment.pgp>


More information about the pkg-fso-maint mailing list