From owner-freebsd-hackers Sat Nov 23 10:02:40 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id KAA05061 for hackers-outgoing; Sat, 23 Nov 1996 10:02:40 -0800 (PST) Received: from skynet.ctr.columbia.edu (skynet.ctr.columbia.edu [128.59.64.70]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id KAA05054 for ; Sat, 23 Nov 1996 10:02:31 -0800 (PST) Received: (from wpaul@localhost) by skynet.ctr.columbia.edu (8.6.12/8.6.9) id NAA05597 for hackers@freebsd.org; Sat, 23 Nov 1996 13:02:12 -0500 From: Bill Paul Message-Id: <199611231802.NAA05597@skynet.ctr.columbia.edu> Subject: descriptors and sockets and pipes, oh my To: hackers@freebsd.org Date: Sat, 23 Nov 1996 13:02:10 -0500 (EST) X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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." =============================================================================