Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!ucsd!nosc!cod!waagen From: waagen@cod.NOSC.MIL (Don E. Waagen) Newsgroups: comp.unix.questions Subject: end of file characters and open file descriptors Message-ID: <1345@cod.NOSC.MIL> Date: 29 Dec 88 19:06:28 GMT Reply-To: waagen@cod.nosc.mil.UUCP (Don E. Waagen) Organization: Naval Ocean Systems Center, San Diego Lines: 23 I'm trying to have two processes communicate via a pipe (stdout), like A | B but with a small difference. Process A will never die (i.e. the connection will never be closed). What I would like to do is have the fread and getchar() calls of process B sense or think that it is seeing the pipe close (i.e. an EOF character returned by the calls) without closing the connection. I have tried flushing EOT characters (^D) to process B, but this doesn't help. The fread call in process B remains blocked. I've also tried having process A's standard out dup'd and then closing standard out, and then duping the duplicate back to 1 (standard out); no luck. It seems the dup'd file descriptors share status fields. My Question: What do the standard library calls use to determine end-of-file. I really need to be able to do this, for a process to know when an end of transmission has occured. Thanks in advance -- Don Waagen