home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.programmer:5265 comp.unix.wizards:4633
- Newsgroups: comp.unix.programmer,comp.unix.wizards
- Path: sparky!uunet!pipex!warwick!coventry!champion
- From: champion@cch.coventry.ac.uk (Alun)
- Subject: Closing ends of pipe().
- Message-ID: <BxM32u.HDK@cck.coventry.ac.uk>
- Sender: news@cck.coventry.ac.uk (news user)
- Nntp-Posting-Host: cc_sysh
- Organization: Coventry University, Coventry, UK.
- Date: Thu, 12 Nov 1992 16:28:05 GMT
- Lines: 17
-
- I have a program that loops x number of times. Forks of a child and uses pipe()
- and dup2() to get the output of the child to the parent. My problem is
- in the program I have to use the pipe() function 'x' times and then fdopen() the
- read end 'x' times. I want to use the FILE* functionality.
-
- What I would like to do is just be able to reopen the write end in the parent
- or is there anyway other of getting the read end to return EOF when there
- is still a write end open ?? So I can put the pipe() and fdopen() code
- outside of the loop.
-
- Cheers
-
- -Alun
-
- --
- A.Champion | That's an interesting point, in the sense of
- (champion@uk.ac.cov.cck) | being very not interesting at all. - The Liar
-