0001-Change-_dbus_exit-to-raise-SIGTERM-by-default.patch

Colin Walters walters at verbum.org
Tue Apr 27 13:55:32 PDT 2010


On Tue, Apr 27, 2010 at 4:34 PM, Lennart Poettering <mzqohf at 0pointer.de> wrote:
> On Tue, 27.04.10 14:32, Colin Walters (walters at verbum.org) wrote:
>
>> New patch from IRC review:
>>
>> On Tue, Apr 27, 2010 at 1:42 PM, Colin Walters <walters at verbum.org> wrote:
>> > See patch.
>
> Hmm, are you sure this is safe? Most SIGTERM handlers will probably use the
> pipe trick (or even signalfd()) to pass the signal back to the main
> loop. That means the the SIGTERM only sets a flag, and execution is
> continued after _dbus_exit(). Not sure if all existing apps which rely
> on this exiting behaviour are really coded in a way that it is safe to
> delay the exit.

I was originally thinking of a component which just did say a few
unlink() calls in its SIGTERM, but if it's returning to the main loop
which is potentially still set up with the connection; then I agree
this could potentially cause problems.

Ok, so let's forget about it, and say if you want to unify your
SIGTERM handling, you have to call set_exit_on_disconnect (FALSE) and
raise SIGTERM on disconnect; end of story.


More information about the dbus mailing list