Date: Fri, 19 Jul 1996 10:09:52 +1000 From: Bruce Evans <bde@zeta.org.au> To: freebsd-bugs@freefall.freebsd.org, j@uriah.heep.sax.de Subject: Re: kern/1397: can't send to a pipe Message-ID: <199607190009.KAA23863@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
> > Pipes are implemented as sockets and this is what fstat > > reports. However send returns a "Socket operation on non-socket" > > error. Either socket operations should work or fstat should report > > the file as a FIFO, not a socket. I fixed this a couple of days ago. Nameless pipes are no longer sockets. S_ISFIFO() still reports that both fifos and sockets are fifos. [f]stat() sets the deprecated S_IFIFO and S_IFSOCK bits correctly. > Pipes are no longer implemented as sockets. Using socket operations > on them was illegal all the time, even if the kernel has not been > reporting the error. Named pipes are still implemented as sockets, but [f]stat() always set the S_IFIFO bit correctly for them, so there is no problem except possibly that socket operations apply to file descriptors that aren't reported as sockets. > Pipes are no longer reported by fstat (i think this is an error, or > at least an omission): It seems to be an omission. fstat(1) doesn't handle the new file type DTYPE_PIPE (which should be named DTYPE_FIFO). Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199607190009.KAA23863>