Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Apr 2006 08:47:37 -0500
From:      "Keith Bottner" <kbottner@barkinglizards.com>
To:        <freebsd-questions@freebsd.org>
Subject:   SIGCHLD and sockets HELP!
Message-ID:  <027201c65ca5$54c89ab0$0e01a8c0@Stile>

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

Keith





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?027201c65ca5$54c89ab0$0e01a8c0>