Date: Wed, 10 Feb 1999 12:03:43 +0800 From: Peter Wemm <peter@netplex.com.au> To: Terry Lambert <tlambert@primenet.com> Cc: kuku@gilberto.physik.RWTH-Aachen.DE (Christoph Kukulies), hackers@FreeBSD.ORG Subject: Re: portability of shm, mmap, pipes and socket IPC Message-ID: <199902100403.MAA55849@spinner.netplex.com.au> In-Reply-To: Your message of "Tue, 09 Feb 1999 22:46:57 GMT." <199902092246.PAA10658@usr02.primenet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199902100403.MAA55849>