home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / programm / 3963 < prev    next >
Encoding:
Internet Message Format  |  1992-07-28  |  1.5 KB

  1. Path: sparky!uunet!ogicse!usenet.coe.montana.edu!news.u.washington.edu!carson.u.washington.edu!donn
  2. From: donn@carson.u.washington.edu (Donn Cave)
  3. Newsgroups: comp.unix.programmer
  4. Subject: Re: Named pipes
  5. Message-ID: <1992Jul28.163824.15886@u.washington.edu>
  6. Date: 28 Jul 92 16:38:24 GMT
  7. Article-I.D.: u.1992Jul28.163824.15886
  8. References: <19076@fritz.filenet.com> <14u80cINNbd8@grasp1.univ-lyon1.fr> <1992Jul26.165838.1278@news.eng.convex.com> <92033@bu.edu>
  9. Sender: news@u.washington.edu (USENET News System)
  10. Organization: University of Washington
  11. Lines: 29
  12.  
  13. tesco@bumetb.bu.edu (Dances With Babes) writes:
  14.  
  15.  
  16. | I have recently discovered named pipes but can't seem to get them to do
  17. | what I want.  Is it possible to use a background process to read from a
  18. | named pipe while many other processes write to that named pipe.
  19. | When i try to test this capability in the unix k shell the background
  20. | process ends.
  21.  
  22. | ex. 
  23. | mknod testpipe p
  24. | cat testpipe &
  25. | ls > testpipe
  26. | The "cat" process ends after the ls is sent to the screen.
  27.  
  28. | I've been told by IBM tech support that this is the way it supposed to work.
  29. | This is on an RS6000 running AIX ver 3.2.2. 
  30.  
  31. IBM tech support is right, but not exercising much imagination.  Try this:
  32.  
  33.   mknod testpipe p
  34.   (echo holding; sleep 60) > testpipe &
  35.   ls > testpipe
  36.  
  37. The pipe should stay open as long as there's at least one process holding it
  38. open for write.
  39.  
  40.     Donn Cave, University Computing Services, University of Washington
  41.     donn@cac.washington.edu
  42.