aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2016-09-25 12:09:09 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2016-09-25 12:09:09 +0200
commit2293a55f93080704fe059b87f2f6c1cdca99721e (patch)
tree46cbfdfb44ffb0ad54fcc0e0bc2927f8ecedfc3f
parent8512495a12f37fa5e38836b4a3efc0252e77328a (diff)
downloadman-pages-2293a55f93080704fe059b87f2f6c1cdca99721e.tar.gz
pipe.7: Document FIONREAD
Reported-by: Patrick McLean <patrickm@gaikai.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r--man7/pipe.715
1 files changed, 15 insertions, 0 deletions
diff --git a/man7/pipe.7 b/man7/pipe.7
index 9977acc3bc..b6a300742a 100644
--- a/man7/pipe.7
+++ b/man7/pipe.7
@@ -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