[comp.protocols.tcp-ip] SIGPIPE not received until second write

schunich@rm1.UUCP (Geoffery Schunicht) (07/14/90)

   I'm working on a project that needs to communicate over sockets to
other machines.  In doing initial testing of possible errors
encountered while using sockets I found that the SIGPIPE signal seemed
to be delayed by one write call when the server was killed off.  The
sockets are set up in the AF_INET address format, using the tcp
protocol and the type is SOCK_STREAM.  The client and server are in the
connected state, sending messages successfully.  If I kill off the
server, the client will make one write successfully (no errors at
all),  but the second will cause the SIGPIPE signal to occur.  We do
want to be able to handle the error and continue processing all other
incoming/outgoing data to those processes still up.  This will occur 
on all the BSD systems we are running, SUN4's, SUN3's, DEC3100, 5400,
etc.

    If has anyone seen this before, or know if there is some initial
set up for the socket or entire network that is missing please email
the solution.  I can get around the problem by doing a second write of
zero bytes right after the first, but this is wasting a system call.

                                           Thanks in advance.

					   Geoff Schunicht
--

uucp: ...novavax!rm1!schunich
schunich@rm1
Work: 305-846-6907