Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!uflorida!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.unix.questions Subject: Re: reliable reads from pipes Message-ID: <13493@smoke.BRL.MIL> Date: 6 Aug 90 11:57:21 GMT References: <1990Aug3.233256.29659@NCoast.ORG> <13483@smoke.BRL.MIL> <11145@alice.UUCP> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 11 In article <11145@alice.UUCP> andrew@alice.UUCP (Andrew Hume) writes: > doug's suggestion to look for \n is doubly important >because your code has both ends of the pipe open in both processes >and thus you won't get end of file. the rule is that in the process >that does the writing should close the reading end of teh pipe >and vice versa. In fact, most of us would probably use popen() and let it take care of the details of getting the pipes set up properly, etc. (Yes, I know that some popen() implementations have bugs, but I think they all work well enough for applications like this one.)