SIGCHLD and sockets HELP!

Alex Zbyslaw xfb52 at dial.pipex.com
Tue Apr 11 11:00:00 UTC 2006


Keith Bottner wrote:

>I am having a problem with SIGCHLD signals and their interaction with
>sockets.
>
>I have an application that forks modules in separate processes and use UNIX
>domain sockets for communication. The main application handles the SIGCHLD
>signal so that it can detect when/if a module crashes and if so restart that
>specific module. The problem arises when the module crashes and before the
>main application is notified with the SIGCHLD signal the socket will
>continue to allow writes. I expected that there would be occasions when the
>SIGCHLD signal would occur after my attempt to write into the socket, but I
>also expected the socket to return an error at which point I could then mark
>the module for restart as well.
>
>My question is, has anybody else had this problem? Does anybody know exactly
>what is going on an why? And most importantly, does anybody have a solution?
>
>Thanks in advance for your time, it is quite an interesting problem so I am
>hoping to get some insightful answers.
>  
>
No-one is chiming in so maybe it would help if you posted a code 
fragment that shows the write to the socket which you expect to fail, 
but which doesn't seem to.

--Alex








More information about the freebsd-questions mailing list