From owner-freebsd-hackers Tue Feb 9 23:59:10 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA27466 for freebsd-hackers-outgoing; Tue, 9 Feb 1999 23:59:10 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from gilberto.physik.RWTH-Aachen.DE (gilberto.physik.rwth-aachen.de [137.226.30.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id XAA27459 for ; Tue, 9 Feb 1999 23:59:08 -0800 (PST) (envelope-from kuku@gilberto.physik.RWTH-Aachen.DE) Received: (from kuku@localhost) by gilberto.physik.RWTH-Aachen.DE (8.8.8/8.8.7) id IAA11748; Wed, 10 Feb 1999 08:58:48 +0100 (MET) (envelope-from kuku) Message-ID: <19990210085847.A11710@gil.physik.rwth-aachen.de> Date: Wed, 10 Feb 1999 08:58:47 +0100 From: Christoph Kukulies To: Peter Wemm , Terry Lambert Cc: Christoph Kukulies , hackers@FreeBSD.ORG Subject: Re: portability of shm, mmap, pipes and socket IPC References: <199902092246.PAA10658@usr02.primenet.com> <199902100403.MAA55849@spinner.netplex.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91 In-Reply-To: <199902100403.MAA55849@spinner.netplex.com.au>; from Peter Wemm on Wed, Feb 10, 1999 at 12:03:43PM +0800 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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