Timestamp:
2015-10-30T10:31:09Z (9 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
9516bb6
Parents:
ad8a810
git-author:
dequis <dx@…> (27-10-15 06:07:02)
git-committer:
dequis <dx@…> (30-10-15 10:31:09)
Message:

Avoid propagating shutdown signal to all subprocesses

This was a sort-of-regression with 7233f68

While this behavior might seem desirable in some cases, multi-user
installs like public servers would rather not kill children while
upgrading.

Turns out that pipes are inherited by forks, and writing in one side
means there might be more than one listener that calls
bitlbee_shutdown(). If the parent gets it, the children will get it
too. If a child gets it, the parent and the other children get it too.

This adds a sighandler_shutdown_setup() function that closes any
previously existing pipes and disconnects the events from them, to
create a new one. This is called again after forking each child process.

While I'm sure this fixes the issue, I still don't understand why it
*didn't* kill the forked processes in some cases. Worrying.

(No files)

Note: See TracChangeset for help on using the changeset viewer.