home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / perl / 7043 < prev    next >
Encoding:
Internet Message Format  |  1992-11-18  |  1.7 KB

  1. Path: sparky!uunet!ferkel.ucsb.edu!taco!rock!stanford.edu!ames!network.ucsd.edu!mvb.saic.com!unogate!news.service.uci.edu!ka.reg.uci.edu!bmarlowe
  2. From: bmarlowe@ka.reg.uci.edu (Brett Marlowe)
  3. Subject: Re: Non blocking open of FIFO: Can it be done in perl?
  4. Nntp-Posting-Host: ka.reg.uci.edu
  5. Message-ID: <bmarlowe.722105958@ka>
  6. Newsgroups: comp.lang.perl
  7. Keywords: O_NDELAY in open on a FIFO
  8. Lines: 29
  9. References: <bmarlowe.722046368@ka> <BxwD69.1IH@chinet.chi.il.us>
  10. Distribution: usa
  11. Date: 18 Nov 92 17:01:35 GMT
  12.  
  13. In <BxwD69.1IH@chinet.chi.il.us> les@chinet.chi.il.us (Leslie Mikesell) writes:
  14.  
  15. >In article <bmarlowe.722046368@ka> bmarlowe@ka.reg.uci.edu (Brett Marlowe) writes:
  16.  
  17. >>I'm using FIFO as a rendezvouz point between two entirely different
  18. >>systems.  My question is... is the there a way to specify O_NDELAY on
  19. >>an open call? Alternatively is there a way to make sure there is a
  20. >>reader on the other end of the FIFO?
  21.  
  22. >At least on sysVish machines, opening a FIFO for read/write access
  23. >is non-blocking.  As a side effect you won't ever see EOF even
  24. >if the other processes open and close the fifo repeatedly, so reads
  25. >will always wait for some data which is what you usually want for the
  26. >case of one reader process acting as some kind of server to one or more
  27. >writing process.
  28.  
  29. >Les Mikesell
  30. >  les@chinet.chi.il.us
  31.  
  32. SunOS would seem to differ.  My implementation blocks on an open until
  33. a reader starts up and the reader receives an EOF when I close.  What
  34. I am trying to avoid is blocking on open when the reader has died/gone
  35. away.
  36.  
  37. -Brett
  38. --
  39. -------------------------------------------------------------------------------
  40. Brett Marlowe    |  University of California, Irvine
  41. bmarlowe@uci.edu |  Office of the Registrar  (making sure you get your bills)
  42.