summaryrefslogtreecommitdiffstats
path: root/man7/pipe.7
diff options
context:
space:
mode:
Diffstat (limited to 'man7/pipe.7')
-rw-r--r--man7/pipe.714
1 files changed, 10 insertions, 4 deletions
diff --git a/man7/pipe.7 b/man7/pipe.7
index d5db27696..baf05bc4a 100644
--- a/man7/pipe.7
+++ b/man7/pipe.7
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pipe 7 2022-12-04 "Linux man-pages 6.03"
+.TH pipe 7 2023-07-16 "Linux man-pages 6.05.01"
.SH NAME
pipe \- overview of pipes and FIFOs
.SH DESCRIPTION
@@ -56,12 +56,19 @@ If a process attempts to write to a full pipe (see below), then
.BR write (2)
blocks until sufficient data has been read from the pipe
to allow the write to complete.
+.PP
Nonblocking I/O is possible by using the
.BR fcntl (2)
.B F_SETFL
operation to enable the
.B O_NONBLOCK
-open file status flag.
+open file status flag or by opening a
+.BR fifo (7)
+with
+.BR O_NONBLOCK .
+If any process has the pipe open for writing, reads fail with
+.BR EAGAIN ;
+otherwise\[em]with no potential writers\[em]reads succeed and return empty.
.PP
The communication channel provided by a pipe is a
.IR "byte stream" :
@@ -356,10 +363,9 @@ are performed only when increasing a pipe's capacity;
an unprivileged user can always decrease a pipe's capacity.
.IP (c)
The accounting and checking against the limits were done as follows:
-.IP
.RS
-.PD 0
.IP (1) 5
+.PD 0
Test whether the user has exceeded the limit.
.IP (2)
Make the new pipe buffer allocation.