]> git.mxchange.org Git - quix0rs-gnu-social.git/commit
Detect when queuedaemon/xmppdaemon parent processes die and kill the child processes.
authorBrion Vibber <brion@pobox.com>
Wed, 10 Mar 2010 19:54:00 +0000 (11:54 -0800)
committerBrion Vibber <brion@pobox.com>
Wed, 10 Mar 2010 19:54:00 +0000 (11:54 -0800)
commit532e486a936c78961ff93d5e8de2dc0b86ee8d2a
treece7dce785643e76df6f9a65d96b1c2ffb95ecf57
parent55e8473a7a87ebe85bcfa5cfb409ce9a9aeafdd0
Detect when queuedaemon/xmppdaemon parent processes die and kill the child processes.
Keeps stray daemon subprocesses from floating around when we kill the parents via a signal!

Accomplished by opening a bidirectional pipe in the parent process; the children close out the writer end and keep the reader in their open sockets list. When the parent dies, the children see that the socket's been closed out and can perform an orderly shutdown.
lib/processmanager.php [new file with mode: 0644]
lib/spawningdaemon.php
scripts/queuedaemon.php
scripts/xmppdaemon.php