Re: How do you passing an fd over a pipe?

Marty Leisner (leisner@sdsp.mc.xerox.com)
Thu, 16 Jul 1998 13:58:57 PDT


>
> Can someone tell me how you'd pass an fd over a pipe in 2.0.34 or 2.1.108? My
> company does some nifty stuff with this facility on Solaris and Hpux, and we
> can emulate it on Win32 with DuplicateHandle(), but I can't work out how to do
> it under Linux.
>
> Many thanks,
> David Howells
>

Passing fd over pipes is a streams thing (I think).

You can use sendmsg/recvmsg to pass fds between processes (you
need to make a rendezvous point).

I don't know if this works over socketpair (i.e. a pipe) (does it??)

-- 
marty
leisner@sdsp.mc.xerox.com  
The Feynman problem solving Algorithm
        1) Write down the problem
        2) Think real hard
        3) Write down the answer
                Murray Gell-mann in the NY Times

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html