Query on TCP/IP, SIGPIPE, ECONNRESE

roma at uiucuxc.CSO.UIUC.EDU roma at uiucuxc.CSO.UIUC.EDU
Tue Nov 18 14:48:00 AEST 1986


> /* Written  7:04 pm  Nov 14, 1986 by sen at sbcs.UUCP in */
> /* ---------- "Query on TCP/IP, SIGPIPE, ECONNRESE" ---------- */
> 
> Instead, if I kill P2, P1 remains in loop, recv succeeds everytime i.e.
> number of bytes received is not less than 0. In fact, it *is* zero. P1
> stays alive. Qn: Why?
> 
> I know that the SIGPIPE is supposed to be raised at the
> sender process if it tries to send msg on a broken connection. How will
> the reciver ever know about the sender's death? By checking number of
> bytes received = 0?

I've had similar questions while working on a TCP/IP project.  From what I can
tell, it's rather easy to check for termination by looping on a read() or recv()
as long as bytes > 0.  However, I *WANT* the receiver to be informed of a
sender's untimely death, as opposed to when he's simply finished sending data.
Do I have to do something with out-of-band data to signal the receiver that
the sender died?

Jon Roma
Computing Services Office, University of Illinois at Urbana-Champaign

ARPANET: roma%uiucuxc at a.cs.uiuc.edu
CSNET:	 roma%uiucuxc at uiuc.csnet
UUCP:	 {ihnp4,pur-ee,convex}!uiucdcs!uiucuxc!roma



More information about the Comp.unix.questions mailing list