Date: Tue, 13 Sep 2005 12:31:06 GMT From: Robert Watson <rwatson@FreeBSD.org> To: rwatson@FreeBSD.org, freebsd-bugs@FreeBSD.org, rwatson@FreeBSD.org Subject: Re: kern/25511: ioctl(fd, FIONREAD, &c) on a FIFO (not PIPE) does not work Message-ID: <200509131231.j8DCV6Ms025874@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
Synopsis: ioctl(fd, FIONREAD, &c) on a FIFO (not PIPE) does not work Responsible-Changed-From-To: freebsd-bugs->rwatson Responsible-Changed-By: rwatson Responsible-Changed-When: Tue Sep 13 11:50:11 GMT 2005 Responsible-Changed-Why: Take ownership of this bug, as I have recently been writing regression tests and fixing fifofs bugs. I have reproduced this bug with a local test program, and believe the description is correct (that the useful result of FIONREAD from the read socket is overwritten with the less useful result of FIONWRITE on the write socket for O_RDWR fifo descriptors). According to POSIX, all this is undefined, but useful behavior would be useful. We may want to handle each ioctl specifically before passing to the socket layer rather than relying on fall-through for precisely this reason (that other ioctls may also be failing oddly). http://www.freebsd.org/cgi/query-pr.cgi?pr=25511
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200509131231.j8DCV6Ms025874>