[JDEV] Proper handling of SIGCHLD in jabberd

Robert Norris rob at nauseum.org
Tue Aug 28 21:10:37 CDT 2001

I'm writing a component that spawns external processes to handle messages
it receives (similar to a CGI, or putting commands in /etc/aliases).

Of course, I need to be calling wait() or waitpid() to clean up processes
as they exit. Where would be the best place to catch SIGCHLD? I could
add a handler to my component, but that would make it difficult should
any other component want to catch SIGCHLD itself.

The other option is to put it in jabberd, but that means that people
need a patched jabberd to use my component. That and it needs to be
generic enough so that anyone writing a component that forks won't run
into problems using it.

I guess something as simplie as just calling wait() would do the trick.

Thoughts? If noone has any ideas, I'm going hack it into jabberd and
submit a patch.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://mail.jabber.org/pipermail/jdev/attachments/20010829/c62184ac/attachment-0002.pgp>

More information about the JDev mailing list