Date: Thu, 7 May 1998 21:37:02 -0700 From: "Justin C. Walker" <justin@lilith.apple.com> To: ahuber@ping.at Cc: hackers@FreeBSD.ORG Subject: Re: Question about pipe() Message-ID: <199805080437.VAA01526@lilith.apple.com> In-Reply-To: Andreas Huber's message of Fri, 08 May 1998 03:04:55 %2B0000 <199805080100.DAA10849@pong.ping.at>
next in thread | previous in thread | raw e-mail | index | archive | help
/* * 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199805080437.VAA01526>