[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jabber-jdev
Subject:    [JDEV] Proper handling of SIGCHLD in jabberd
From:       Robert Norris <rob () nauseum ! org>
Date:       2001-08-29 2:10:37
[Download RAW message or body]


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.

Rob.

[Attachment #3 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic