home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / programm / 4550 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  1.5 KB

  1. Path: sparky!uunet!pipex!warwick!uknet!glasgow!sinclair
  2. From: sinclair@dcs.glasgow.ac.uk (Duncan Sinclair)
  3. Newsgroups: comp.unix.programmer
  4. Subject: FIFOs vs. pipes w.r.t EOFs and select
  5. Message-ID: <Bu68zC.F9C@dcs.glasgow.ac.uk>
  6. Date: 6 Sep 92 19:33:12 GMT
  7. Organization: Glasgow University Computing Science Dept.
  8. Lines: 26
  9.  
  10. I've just been messing about with pipes, and named pipes, and
  11. found a strange problem.
  12.  
  13. When I'm selecting on a normal pipe, and the other side closes it,
  14. select wakes up on that pipe, and I get an eof.  That's what I expect.
  15.  
  16. When I'm selecting on a named pipe, and the other side closes it,
  17. select doesn't wake up, and so I dont get to see any eof that may
  18. or may not be there.  This doesn't seem right.
  19.  
  20. The standard reason for not getting eofs, is because some other process
  21. has the descriptor open, but this doesn't seem likely in this case.  I
  22. don't get the problem with normal pipes, and I'm creating the named
  23. pipes with a compatibility routine to make them look like normal pipes,
  24. so I don't see where the difference could be.
  25.  
  26. This is with SunOS 4.1.1.  Is this behaviour normal, or is it a problem
  27. with Sun's implementation, or is it me just screwing up as usual?
  28.  
  29.  
  30.  
  31. -- 
  32. Duncan Sinclair                     |  Try one    sinclair@dcs.glasgow.ac.uk
  33. Computing Science Research Student  |  of these:  sinclair@uk.ac.glasgow.dcs
  34. University of Glasgow               |..!mcsun!ukc!uk.ac.glasgow.dcs!sinclair
  35.            ---  Rave Culture: Don't techno for an answer.  ---
  36.