Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Nov 1996 13:02:10 -0500 (EST)
From:      Bill Paul <wpaul@skynet.ctr.columbia.edu>
To:        hackers@freebsd.org
Subject:   descriptors and sockets and pipes, oh my
Message-ID:  <199611231802.NAA05597@skynet.ctr.columbia.edu>

next in thread | raw e-mail | index | archive | help

Does anyone have a source code example handy of passing a file
descriptor from one process to anyther via an AF_UNIX socket?
_UNIX Network Programming_ only provides an example for 4.3BSD; in 
4.4BSD, the msghdr structure has changed. Also, is it possible to
pass descriptors between totally unrelated processes, or must
they be parent and child?

Lastly, is it still possible to exchange file descriptors with the
new pipe code in 2.2.x? The example in the book uses pipe(), but
that's because pipes were really AF_UNIX sockets in disguise; this
isn't true in FreeBSD 2.2.x anymore.

-Bill

-- 
=============================================================================
-Bill Paul            (212) 854-6020 | System Manager, Master of Unix-Fu
Work:         wpaul@ctr.columbia.edu | Center for Telecommunications Research
Home:  wpaul@skynet.ctr.columbia.edu | Columbia University, New York City
=============================================================================
 "If you're ever in trouble, go to the CTR. Ask for Bill. He will help you."
=============================================================================



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199611231802.NAA05597>