From owner-freebsd-hackers Thu May 7 21:41:27 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA17331 for freebsd-hackers-outgoing; Thu, 7 May 1998 21:41:27 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from mail-out1.apple.com (mail-out1.apple.com [17.254.0.52]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA17310 for ; Thu, 7 May 1998 21:41:02 -0700 (PDT) (envelope-from justin@lilith.apple.com) Received: from mailgate.apple.com (A17-128-100-225.apple.com [17.128.100.225]) by mail-out1.apple.com (8.8.5/8.8.5) with ESMTP id VAA19214 for ; Thu, 7 May 1998 21:36:54 -0700 Received: from scv3.apple.com (unverified [17.128.100.121]) by mailgate.apple.com (mailgate.apple.com2.0.15) with ESMTP id ; Thu, 07 May 1998 21:36:52 -0700 Received: from lilith.apple.com (lilith.apple.com [17.202.41.78]) by scv3.apple.com (8.8.5/8.8.5) with ESMTP id VAA13506; Thu, 7 May 1998 21:36:50 -0700 Received: (justin@localhost) by lilith.apple.com (8.6.9/A/UX 3.1) id VAA01526; Thu, 7 May 1998 21:37:02 -0700 Date: Thu, 7 May 1998 21:37:02 -0700 From: "Justin C. Walker" Message-Id: <199805080437.VAA01526@lilith.apple.com> To: ahuber@ping.at Cc: hackers@FreeBSD.ORG In-Reply-To: Andreas Huber's message of Fri, 08 May 1998 03:04:55 +0000 <199805080100.DAA10849@pong.ping.at> Subject: Re: Question about pipe() Reply-To: justin@apple.com Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG /* * I was under the impression that if the write end of a pipe is closed, a * read() at the other end of the pipe will return an error (or at least * an EOF condition). Apparently it doesn't. Did I miss something? Is * there another way to interrupt the read()? */ In case no one's answered: a pipe reader will hang around waiting for data to read, the idea being that the pipe reader is a "service provider", while the pipe writer is the "service requester". A pipe doesn't really have an end-of-file - it's "infinitely long". The writer can get an error condition (EPIPE and/or SIGPIPE) because otherwise, there's no way of knowing that the "service provider" has taken a vacation (or otherwise wandered off into the weeds). Regards, Justin Justin C. Walker, Curmudgeon-At-Large * Institute for General Semantics | They sentenced me to 20 years Apple CoreOS Networking | of boredom Apple Computer, Inc. | For trying to change the system 2 Infinite Loop | from within Cupertino, CA 95014 | LC *---------------------------------------*------------------------------------* To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message