Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!uwm.edu!rpi!zaphod.mps.ohio-state.edu!samsung!munnari.oz.au!murdu!viccol!timcc From: timcc@csv.viccol.edu.au (Tim Cook) Newsgroups: comp.unix.wizards Subject: Re: How do I get EOF from a pipe I created? Message-ID: <6368.26bff649@csv.viccol.edu.au> Date: 8 Aug 90 16:23:53 GMT References: <6366.26be9bd9@csv.viccol.edu.au> Organization: Computer Services, Victoria College, Melbourne Lines: 21 In article <6366.26be9bd9@csv.viccol.edu.au>, I asked for help with pipes. Well, it seems I did overlook something that should have been obvious. Both processes needed to close the write end of the pipe before the read end would see EOF. My other problem where my ``child'' process got control of the tty was due to a switch statement that I wrote but did not double-check (I did not actually use an if statement like the one in my example code). I got the parent confused with the child. Thanks to those who wrote with answers, and to those who are yet to write (due to the propagation properties of Usenet and the wizards mailing list). One last thing. Only one person has written so far and suggested popen(3), which would have done what I was wanting to do nicely. I didn't think of it because I don't get mention of it when I do a "man -k pipe" on my system. -- Tim Cook Systems Administrator, Victoria College Computer Services parrot - n. An animal that has the ability to imitate man, but not the intelligence to refrain from doing so.