Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!columbia!rutgers!clyde!cuae2!ihnp4!inuxc!pur-ee!uiucdcs!uiucuxc!roma From: roma@uiucuxc.CSO.UIUC.EDU Newsgroups: comp.unix.questions Subject: Re: Query on TCP/IP, SIGPIPE, ECONNRESE Message-ID: <176200002@uiucuxc> Date: Mon, 17-Nov-86 23:48:00 EST Article-I.D.: uiucuxc.176200002 Posted: Mon Nov 17 23:48:00 1986 Date-Received: Wed, 19-Nov-86 06:20:57 EST References: <231@sbcs.UUCP> Lines: 26 Nf-ID: #R:sbcs.UUCP:231:uiucuxc:176200002:000:1136 Nf-From: uiucuxc.CSO.UIUC.EDU!roma Nov 17 22:48:00 1986 > /* Written 7:04 pm Nov 14, 1986 by sen@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@a.cs.uiuc.edu CSNET: roma%uiucuxc@uiuc.csnet UUCP: {ihnp4,pur-ee,convex}!uiucdcs!uiucuxc!roma