fcntl.2: F_GETPIPE_SZ allocates next power-of-2 multiple of requested size

Add some detail about current implementation, since this helps
the user understand the effect of the user pipe limits added in
Linux 4.5 (described in pipe(7)).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2016-08-14 09:02:20 +12:00
parent ef422cb6e1
commit bc1be43eef
1 changed files with 4 additions and 1 deletions

View File

@ -1337,7 +1337,10 @@ When allocating the buffer for the pipe,
the kernel may use a capacity larger than
.IR arg ,
if that is convenient for the implementation.
The actual capacity that is set is returned as the function result.
(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.
Attempting to set the pipe capacity smaller than the amount
of buffer space currently used to store data produces the error