pipe.7: Document FIONREAD

Reported-by: Patrick McLean <patrickm@gaikai.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2016-09-25 12:09:09 +02:00
parent 8512495a12
commit 2293a55f93
1 changed files with 15 additions and 0 deletions

View File

@ -143,6 +143,21 @@ operations.
See
.BR fcntl (2)
for more information.
The following
.BR ioctl (2)
operation, which can be applied to a file descriptor
that refers to either end of a pipe,
places a count of the number of unread bytes in the pipe in the
.I int
buffer pointed to by the final argument of the call:
ioctl(fd, FIONREAD, &nbytes);
The
.B FIONREAD
operation is not specified in any standard,
but is provided on many implementations.
.\"
.SS PIPE_BUF
POSIX.1 says that