From owner-freebsd-hackers Tue Feb 9 20:04:31 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id UAA03768 for freebsd-hackers-outgoing; Tue, 9 Feb 1999 20:04:31 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from spinner.netplex.com.au (spinner.netplex.com.au [202.12.86.3]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id UAA03762 for ; Tue, 9 Feb 1999 20:04:28 -0800 (PST) (envelope-from peter@netplex.com.au) Received: from spinner.netplex.com.au (localhost [127.0.0.1]) by spinner.netplex.com.au (8.9.2/8.9.2/Netplex) with ESMTP id MAA55849; Wed, 10 Feb 1999 12:03:43 +0800 (WST) (envelope-from peter@spinner.netplex.com.au) Message-Id: <199902100403.MAA55849@spinner.netplex.com.au> X-Mailer: exmh version 2.0.2 2/24/98 To: Terry Lambert cc: kuku@gilberto.physik.RWTH-Aachen.DE (Christoph Kukulies), hackers@FreeBSD.ORG Subject: Re: portability of shm, mmap, pipes and socket IPC In-reply-to: Your message of "Tue, 09 Feb 1999 22:46:57 GMT." <199902092246.PAA10658@usr02.primenet.com> Date: Wed, 10 Feb 1999 12:03:43 +0800 From: Peter Wemm Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Terry Lambert wrote: [...] > FreeBSD fails to support fcntl's on sockets: F_SETOWN, F_GETOWN, F_GETLK, > F_SETLK, F_SETLKW. This is due to the use of struct fileops, > since sockets are not backed by true vnode objects. Terry, read the bloody source before spreading unverified FUD like this.. The fcntl(2) ops F_SETOWN/F_GETOWN are translated into FIOSETOWN/FIOGETOWN ioctl's and are fully implemented. However, as you point out, the fcntl() (and flock()) *locking* operations are not implemented. IMHO file locking on a socket is of pretty marginal value since there is no seek space (with the possible exception of using it for a mutex instead of using sendmsg() or something sensible). > > pipes - ? named pipes? > > FreeBSD pipes are bidirectional, since they are implemented with the > AF_UNIX socket code. Rubbish! They are quite seperate to an AF_UNIX socketpair() and have been for a *long* time (since 1996 when 2.2 was branched). As in kern/sys_pipe.c: /* * This file contains a high-performance replacement for the socket-based * pipes scheme originally used in FreeBSD/4.4Lite. It does not support * all features of sockets, but does do everything that pipes normally * do. */ > FreeBSD fails to support fcntl's on pipes: F_SETOWN, F_GETOWN, F_GETLK, > F_SETLK, F_SETLKW. This is due to the use of struct fileops, > since pipes are not backed by true vnode objects. F_SETOWN/F_GETOWN are implemented as ioctl calls, that part is wrong. *Only* the file locking parts are not implemented since it's of such little value with no seek space. > Terry Lambert > terry@lambert.org Cheers, -Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message