From owner-freebsd-bugs Thu Jul 18 20:10:06 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id UAA18889 for bugs-outgoing; Thu, 18 Jul 1996 20:10:06 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id UAA18874; Thu, 18 Jul 1996 20:10:01 -0700 (PDT) Date: Thu, 18 Jul 1996 20:10:01 -0700 (PDT) Message-Id: <199607190310.UAA18874@freefall.freebsd.org> To: freebsd-bugs Cc: From: Bruce Evans Subject: Re: kern/1397: can't send to a pipe Reply-To: Bruce Evans Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk The following reply was made to PR kern/1397; it has been noted by GNATS. From: Bruce Evans 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 Date: Fri, 19 Jul 1996 13:03:26 +1000 >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