home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / programm / 5265 < prev    next >
Encoding:
Internet Message Format  |  1992-11-12  |  1.1 KB

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