]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
man/man2/fcntl.2, man/man2const/F_GETPIPE_SZ.2const: Split F_{G,S}ETPIPE_SZ from...
authorAlejandro Colomar <alx@kernel.org>
Sat, 12 Jul 2025 23:28:43 +0000 (01:28 +0200)
committerAlejandro Colomar <alx@kernel.org>
Sat, 19 Jul 2025 22:42:57 +0000 (00:42 +0200)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
man/man2/fcntl.2
man/man2const/F_GETPIPE_SZ.2const [new file with mode: 0644]

index ef2b053b2201cbc82bd4f9f62b0ee6445cc8c29a..1c5c3bdf126a5197e6785628222b4d24cb0ae8a8 100644 (file)
@@ -1169,49 +1169,9 @@ See
 .BR inotify (7).
 .SS Changing the capacity of a pipe
 .TP
-.BR F_SETPIPE_SZ "\~(\f[I]int\f[]; since Linux 2.6.35)"
-Change the capacity of the pipe referred to by
-.I fd
-to be at least
-.I arg
-bytes.
-An unprivileged process can adjust the pipe capacity to any value
-between the system page size and the limit defined in
-.I /proc/sys/fs/pipe\-max\-size
-(see
-.BR proc (5)).
-Attempts to set the pipe capacity below the page size are silently
-rounded up to the page size.
-Attempts by an unprivileged process to set the pipe capacity above the limit in
-.I /proc/sys/fs/pipe\-max\-size
-yield the error
-.BR EPERM ;
-a privileged process
-.RB ( CAP_SYS_RESOURCE )
-can override the limit.
-.IP
-When allocating the buffer for the pipe,
-the kernel may use a capacity larger than
-.IR arg ,
-if that is convenient for the implementation.
-(In the current implementation,
-the allocation is the next higher power-of-two page-size multiple
-of the requested size.)
-The actual capacity (in bytes) that is set is returned as the function result.
-.IP
-Attempting to set the pipe capacity smaller than the amount
-of buffer space currently used to store data produces the error
-.BR EBUSY .
-.IP
-Note that because of the way the pages of the pipe buffer
-are employed when data is written to the pipe,
-the number of bytes that can be written may be less than the nominal size,
-depending on the size of the writes.
-.TP
-.BR F_GETPIPE_SZ "\~(\f[I]void\f[]; since Linux 2.6.35)"
-Return (as the function result) the capacity of the pipe referred to by
-.IR fd .
-.\"
+.BR F_SETPIPE_SZ (2const)
+.TQ
+.BR F_GETPIPE_SZ (2const)
 .SS File Sealing
 File seals limit the set of allowed operations on a given file.
 For each seal that is set on a file,
@@ -1467,11 +1427,6 @@ for traditional
 .B SIGIO
 behavior.
 .TP
-.B F_GETPIPE_SZ
-.TQ
-.B F_SETPIPE_SZ
-The pipe capacity.
-.TP
 .B F_GET_SEALS
 A bit mask identifying the seals that have been set
 for the inode referred to by
@@ -1508,15 +1463,6 @@ type of lock requested.
 .B EBUSY
 .I op
 is
-.B F_SETPIPE_SZ
-and the new pipe capacity specified in
-.I arg
-is smaller than the amount of buffer space currently
-used to store data in the pipe.
-.TP
-.B EBUSY
-.I op
-is
 .BR F_ADD_SEALS ,
 .I arg
 includes
@@ -1611,13 +1557,6 @@ does not refer to a directory.
 .TP
 .B EPERM
 .I op
-is
-.B F_SETPIPE_SZ
-and the soft or hard user pipe limit has been reached; see
-.BR pipe (7).
-.TP
-.B EPERM
-.I op
 was
 .BR F_ADD_SEALS ,
 but
@@ -1636,8 +1575,6 @@ POSIX.1-2008.
 .P
 .BR F_GETOWN_EX ,
 .BR F_SETOWN_EX ,
-.BR F_SETPIPE_SZ ,
-.BR F_GETPIPE_SZ ,
 .BR F_GETSIG ,
 .BR F_SETSIG ,
 .BR F_NOTIFY ,
diff --git a/man/man2const/F_GETPIPE_SZ.2const b/man/man2const/F_GETPIPE_SZ.2const
new file mode 100644 (file)
index 0000000..9ae2643
--- /dev/null
@@ -0,0 +1,96 @@
+.\" Copyright, the authors of the Linux man-pages project
+.\"
+.\" SPDX-License-Identifier: Linux-man-pages-copyleft
+.\"
+.TH F_GETPIPE_SZ 2const (date) "Linux man-pages (unreleased)"
+.SH NAME
+F_GETPIPE_SZ,
+F_SETPIPE_SZ
+\-
+get/set the capacity of a pipe
+.SH LIBRARY
+Standard C library
+.RI ( libc ,\~ \-lc )
+.SH SYNOPSIS
+.nf
+.B #define _GNU_SOURCE
+.B #include <fcntl.h>
+.P
+.BI "int fcntl(int " fd ", F_SETPIPE_SZ, int " arg );
+.BI "int fcntl(int " fd ", F_GETPIPE_SZ);"
+.fi
+.SH DESCRIPTION
+.TP
+.BR F_SETPIPE_SZ "\~(\f[I]int\f[]; since Linux 2.6.35)"
+Change the capacity of the pipe referred to by
+.I fd
+to be at least
+.I arg
+bytes.
+An unprivileged process can adjust the pipe capacity to any value
+between the system page size and the limit defined in
+.I /proc/sys/fs/pipe\-max\-size
+(see
+.BR proc (5)).
+Attempts to set the pipe capacity below the page size are silently
+rounded up to the page size.
+Attempts by an unprivileged process to set the pipe capacity above the limit in
+.I /proc/sys/fs/pipe\-max\-size
+yield the error
+.BR EPERM ;
+a privileged process
+.RB ( CAP_SYS_RESOURCE )
+can override the limit.
+.IP
+When allocating the buffer for the pipe,
+the kernel may use a capacity larger than
+.IR arg ,
+if that is convenient for the implementation.
+(In the current implementation,
+the allocation is the next higher power-of-two page-size multiple
+of the requested size.)
+The actual capacity (in bytes) that is set is returned as the function result.
+.IP
+Attempting to set the pipe capacity smaller than the amount
+of buffer space currently used to store data produces the error
+.BR EBUSY .
+.IP
+Note that because of the way the pages of the pipe buffer
+are employed when data is written to the pipe,
+the number of bytes that can be written may be less than the nominal size,
+depending on the size of the writes.
+.TP
+.BR F_GETPIPE_SZ "\~(\f[I]void\f[]; since Linux 2.6.35)"
+Return (as the function result) the capacity of the pipe referred to by
+.IR fd .
+.SH RETURN VALUE
+The pipe capacity.
+.P
+On error, \-1 is returned, and
+.I errno
+is set to indicate the error.
+.SH ERRORS
+See
+.BR fcntl (2).
+.TP
+.B EBUSY
+.I op
+is
+.B F_SETPIPE_SZ
+and the new pipe capacity specified in
+.I arg
+is smaller than the amount of buffer space currently
+used to store data in the pipe.
+.TP
+.B EPERM
+.I op
+is
+.B F_SETPIPE_SZ
+and the soft or hard user pipe limit has been reached; see
+.BR pipe (7).
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux.
+.SH SEE ALSO
+.BR fcntl (2)