home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / programm / 3946 < prev    next >
Encoding:
Text File  |  1992-07-27  |  1.6 KB  |  43 lines

  1. Newsgroups: comp.unix.programmer
  2. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!convex!convex!tchrist
  3. From: Tom Christiansen <tchrist@convex.COM>
  4. Subject: Re: Named pipes
  5. Message-ID: <1992Jul27.231614.21414@news.eng.convex.com>
  6. Originator: tchrist@pixel.convex.com
  7. Sender: usenet@news.eng.convex.com (news access account)
  8. Nntp-Posting-Host: pixel.convex.com
  9. Reply-To: tchrist@convex.COM (Tom Christiansen)
  10. Organization: CONVEX Realtime Development, Colorado Springs, CO
  11. References: <1992Jul26.165838.1278@news.eng.convex.com> <92033@bu.edu> <1992Jul27.221133.27847@mintaka.lcs.mit.edu>
  12. Date: Mon, 27 Jul 1992 23:16:14 GMT
  13. X-Disclaimer: This message was written by a user at CONVEX Computer
  14.               Corp. The opinions expressed are those of the user and
  15.               not necessarily those of CONVEX.
  16. Lines: 25
  17.  
  18. From the keyboard of mycroft@hal.gnu.ai.mit.edu (Charles Hannum):
  19. :
  20. :In article <92033@bu.edu> tesco@bumetb.bu.edu (Dances With Babes) writes:
  21. :>
  22. :> mknod testpipe p
  23. :> cat testpipe &
  24. :> ls > testpipe
  25. :> The "cat" process ends after the ls is sent to the screen.
  26. :
  27. :This is the way named pipes have worked since The Dawn of Time.  If you
  28. :want to have multiple processes write to the pipe, you need the reader
  29. :to reopen it.  In the shell, you could do something like this:
  30. :
  31. :(while :;do cat testpipe;done)&
  32.  
  33. Or have the writers all write to a common descriptor:
  34.  
  35.     ( wtr1; wtr2; wtr3 ) > testpipe
  36.  
  37. --tom
  38. -- 
  39.     Tom Christiansen      tchrist@convex.com      convex!tchrist
  40.  
  41. "The number of UNIX installations has grown to 10, with more expected."
  42.     - _The UNIX Programmer's Manual_, Second Edition, June, 1972.
  43.