Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Apr 2006 11:59:55 +0100
From:      Alex Zbyslaw <xfb52@dial.pipex.com>
To:        Keith Bottner <kbottner@barkinglizards.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: SIGCHLD and sockets HELP!
Message-ID:  <443B8C2B.7080006@dial.pipex.com>
In-Reply-To: <027201c65ca5$54c89ab0$0e01a8c0@Stile>
References:  <027201c65ca5$54c89ab0$0e01a8c0@Stile>

next in thread | previous in thread | raw e-mail | index | archive | help
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









Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?443B8C2B.7080006>