Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Jul 1996 13:03:26 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        markd@Grizzly.COM, wpaul@skynet.ctr.columbia.edu
Cc:        FreeBSD-gnats-submit@freebsd.org, bugs@freefall.freebsd.org
Subject:   Re: kern/1397: can't send to a pipe
Message-ID:  <199607190303.NAA30974@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>Reporting FIFO would probably be better than SOCK, at least that wouldn't
>lead people to do the wrong thing because they think its a socket.

>Given all of this, the definition of S_ISFIFO probably is wrong as well:

>#define	S_ISFIFO(m)	(((m) & 0170000) == 0010000 || \
>			 ((m) & 0170000) == 0140000)	/* fifo or socket */

This is a kludge for nameless pipes being implemented as sockets.  There
was no way to distinguish between a nameless pipe and a socket, at least
using the stat classifition macros or mode bits.  Portable code will
have to deal with this for years.  It's still in 2.1.5 and it's probably
in many other BSD4.4-derived systems.

The above #define should be changed soon.  I'm a bit worried about new
ports and libraries being used with old kernels.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199607190303.NAA30974>