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

  1. Path: sparky!uunet!think.com!barmar
  2. From: barmar@think.com (Barry Margolin)
  3. Newsgroups: comp.unix.programmer
  4. Subject: Re: Named pipes and mknod...
  5. Date: 6 Nov 1992 17:12:06 GMT
  6. Organization: Thinking Machines Corporation, Cambridge MA, USA
  7. Lines: 19
  8. Message-ID: <1de916INN8o2@early-bird.think.com>
  9. References: <haley.720956802@husc11>
  10. NNTP-Posting-Host: telecaster.think.com
  11. Keywords: named pipe mknod FIFO
  12.  
  13. In article <haley.720956802@husc11> haley@husc11.harvard.edu (Elizabeth Haley) writes:
  14. >The man pages suggest how exactly one uses it to make that damned dir
  15. >entry, which tells me nothing of the mechanism for connecting a driver
  16. >to it...
  17.  
  18. Just open it.  If two processes open a named pipe (aka a FIFO), anything
  19. one writes will be read by the other.  If you want the driver to be a data
  20. sink, it should opening it for reading; if it's a data source it should
  21. open it for writing.  Clients should use the opposite mode; named pipes are
  22. one-way channels.
  23.  
  24. For more details about using FIFOs, see section 14.5 of "Advanced
  25. Programming in the UNIX Environment", by W. Richard Stevens (if you thought
  26. his "Unix Network Programming" was good, you'll love this).
  27. -- 
  28. Barry Margolin
  29. System Manager, Thinking Machines Corp.
  30.  
  31. barmar@think.com          {uunet,harvard}!think!barmar
  32.