Xref: utzoo comp.unix.wizards:8461 comp.unix.questions:7003 Path: utzoo!attcan!uunet!husc6!bloom-beacon!mit-eddie!ll-xn!ames!elan!jlo From: jlo@elan.UUCP (Jeff Lo) Newsgroups: comp.unix.wizards,comp.unix.questions Subject: EOF on a pipe? Keywords: read(2), pipes, O_NDELAY, EOF Message-ID: <311@elan.UUCP> Date: 13 May 88 23:43:04 GMT Organization: Elan Computer Group, Inc., Palo Alto, CA Lines: 14 I need to be able to read from a pipe in no delay mode and be able to ditinguish between EOF, and cases when there is just no data, but the pipe is still open. This is no problem under 4.2 since the read() will return 0 on EOF, and if the pipe is empty, but still open on the other end, it will return -1 and set errno to EWOULDBLOCK. Under System 5 (5.2 and 5.3) the read() returns 0 in both cases. Does anybody know how to distinguish between these two cases under System 5? Jeff Lo Elan Computer Group, Inc. ..!{ames,hplabs}!elan!jlo