How do you pass file descriptors over IPC?
brnstnd at stealth.acf.nyu.edu
brnstnd at stealth.acf.nyu.edu
Fri May 4 12:16:44 AEST 1990
In article <2395 at uakari.primate.wisc.edu> bin at 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
More information about the Comp.unix.wizards
mailing list