Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Nov 1996 13:42:09 -0500 (EST)
From:      Sujal Patel <smpatel@umiacs.umd.edu>
To:        Bill Paul <wpaul@skynet.ctr.columbia.edu>
Cc:        hackers@freebsd.org
Subject:   Re: descriptors and sockets and pipes, oh my
Message-ID:  <Pine.OSF.3.91.961123133733.1120D-100000@mickey.umiacs.umd.edu>
In-Reply-To: <199611231802.NAA05597@skynet.ctr.columbia.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 23 Nov 1996, Bill Paul wrote:

> _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?

The example in UNP can be adapted to 4.4 pretty easily.  The man page 
should be enough to get you up and running.  You can also use a AF_UNIX 
named filesystem socket, to pass descriptors between unrelated processes.

> 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.

The only way to pass file descriptors in BSD is to use AF_UNIX sockets.  
SYSV does provide an ioctl for passing file descriptors over pipes (I think).


sujal



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.OSF.3.91.961123133733.1120D-100000>