Date: Wed, 10 Feb 1999 08:58:47 +0100 From: Christoph Kukulies <kuku@gilberto.physik.RWTH-Aachen.DE> To: Peter Wemm <peter@netplex.com.au>, Terry Lambert <tlambert@primenet.com> Cc: Christoph Kukulies <kuku@gilberto.physik.RWTH-Aachen.DE>, hackers@FreeBSD.ORG Subject: Re: portability of shm, mmap, pipes and socket IPC Message-ID: <19990210085847.A11710@gil.physik.rwth-aachen.de> In-Reply-To: <199902100403.MAA55849@spinner.netplex.com.au>; from Peter Wemm on Wed, Feb 10, 1999 at 12:03:43PM %2B0800 References: <199902092246.PAA10658@usr02.primenet.com> <199902100403.MAA55849@spinner.netplex.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Feb 10, 1999 at 12:03:43PM +0800, Peter Wemm wrote: > 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 > > Seems I have kicked off an avalanche :-) Someone was mentioning in an off-net discussion with some linux guys, that when using timeval struct in select the time structure members were dealt differently (units, offsets? - not clear what my discussion partner meant, but it alarmed me a bit). But OTOH, when XFree86 is running on both all I'd have to do is looking perhaps in the XFree86 source.. -- Chris Christoph P. U. Kukulies kuku@gil.physik.rwth-aachen.de 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?19990210085847.A11710>