From owner-freebsd-bugs Thu Jul 18 20:07:59 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id UAA18607 for bugs-outgoing; Thu, 18 Jul 1996 20:07:59 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id UAA18588 for ; Thu, 18 Jul 1996 20:07:49 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.12/8.6.9) id NAA30974; Fri, 19 Jul 1996 13:03:26 +1000 Date: Fri, 19 Jul 1996 13:03:26 +1000 From: Bruce Evans Message-Id: <199607190303.NAA30974@godzilla.zeta.org.au> To: markd@Grizzly.COM, wpaul@skynet.ctr.columbia.edu Subject: Re: kern/1397: can't send to a pipe Cc: FreeBSD-gnats-submit@freebsd.org, bugs@freefall.freebsd.org Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >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