home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / internal / 1718 < prev    next >
Encoding:
Internet Message Format  |  1992-08-20  |  1.3 KB

  1. Path: sparky!uunet!kithrup!hoptoad!pacbell.com!mips!swrinde!zaphod.mps.ohio-state.edu!rpi!think.com!barmar
  2. From: barmar@think.com (Barry Margolin)
  3. Newsgroups: comp.unix.internals
  4. Subject: Re: Socket to which related processes may read/write ?.
  5. Message-ID: <17113aINN3pt@early-bird.think.com>
  6. Date: 20 Aug 92 20:59:22 GMT
  7. References: <1992Aug19.225324.21116@hubcap.clemson.edu>
  8. Distribution: na
  9. Organization: Thinking Machines Corporation, Cambridge MA, USA
  10. Lines: 19
  11. NNTP-Posting-Host: telecaster.think.com
  12.  
  13. In article <1992Aug19.225324.21116@hubcap.clemson.edu> rsaripa@venus.cs.clemson.edu (Saripalli Ramakrishna) writes:
  14. >    I would like to know if there is any way a socket can be established
  15. >    by some ancestor so that all of its descendants might be able to
  16. >    monitor the socket(channel) and be able to read/write from/to the
  17. >    socket.
  18.  
  19. If the socket is opened by the ancestor before it forks the children, then
  20. the children will inherit it (just like any other descriptors) and can use
  21. it.
  22.  
  23. If the socket is opened after the children are spawned, you can use Unix
  24. domain sockets to pass the socket access right to the children.  Stevens
  25. has a section on passing access rights, although I've heard that it doesn't
  26. work in all socket implementations.
  27. -- 
  28. Barry Margolin
  29. System Manager, Thinking Machines Corp.
  30.  
  31. barmar@think.com          {uunet,harvard}!think!barmar
  32.