Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!yale!cmcl2!stealth.acf.nyu.edu!brnstnd From: brnstnd@stealth.acf.nyu.edu Newsgroups: comp.unix.wizards Subject: Re: How do you pass file descriptors over IPC? Message-ID: <20465:May402:16:4490@stealth.acf.nyu.edu> Date: 4 May 90 02:16:44 GMT References: <2395@uakari.primate.wisc.edu> Reply-To: brnstnd@stealth.acf.nyu.edu (Dan Bernstein) Distribution: usa Organization: IR Lines: 16 In article <2395@uakari.primate.wisc.edu> bin@primate.wisc.edu (Brain in Neutral) writes: > The BSD IPC documentation makes mention of the possibility of passing > file descriptors between processes using IPC. You set up a UNIX-domain socket connection, then use sendmsg() and recvmsg(). Don't pass any iovs, just a few descriptors. They'll be renumbered and placed into the receiving array; and they'll be open in the receiving process. > Which BSD programs (if any) do this? I could then perhaps grab the > source from uunet and examine it. I don't know of any offhand; it's not a commonly appreciated feature. I'm using it a bit in some upcoming programs. ---Dan