Skip to contentSkip to conversation

pipe.2 and pipe.7 fixes

PATCH In review Elie De Brauwer 3 participants 7 messages Jul 6, 2014 – Jul 7, 2014 4 messages not in the archive Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

cover pipe.2 and pipe.7 fixes

Hello Michael,

Attached are two patches related to the pipe man pages.
- pipe.2 mentions the use of PIPE_BUF but nowhere is mentioned that it
should be included via limits.h
- pipe.7 only talks about static pipe capacity, however proc.5 and fcntl.2
already mention F_SETPIPE_SZ, F_GETPIPE_SZ and /proc/sys/fs/pipe-max-size hence I added a reference to fcntl.2.

my 2 cents
E.

Elie De Brauwer (2):
pipe.2: PIPE_BUF is defined in limits.h
pipe.7: Add reference that the pipe capacity can be changed.

 man2/pipe.2 |  4 ++++
 man7/pipe.7 | 10 ++++++++++
 2 files changed, 14 insertions(+)
Signature · 6 lines
2.0.0

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw

PATCH 1/2 pipe.2: PIPE_BUF is defined in limits.h

In reply to a message not in the archive

To make use of PIPE_BUF in an application one should include limits.h. Adding a reference to this inclusion.

---
 man2/pipe.2 | 4 ++++
 1 file changed, 4 insertions(+)
man2/pipe.2 +4 -0
index a5ed2ea..7f1a1d0 100644
@@ -98,6 +98,10 @@ Writes of greater than
 bytes (see
 .BR pipe (7))
 will be split into multiple packets.
+The constant
+.BR PIPE_BUF
+is defined in
+.IR <limits.h> .
 .IP *
 If a
 .BR read (2)
Signature · 6 lines
2.0.0

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#5 lore raw

PATCH 2/2 pipe.7: Add reference that the pipe capacity can be changed.

In reply to a message not in the archive

In fcntl(2) F_SETPIPE_SZ, F_GETPIPE_SZ and /proc/sys/fs/pipe-max-size are defined, however pipe(7) still defines the pipe capacity as being a static entity. Adding a reference to fcntl(2).

---
 man7/pipe.7 | 10 ++++++++++
 1 file changed, 10 insertions(+)
man7/pipe.7 +10 -0
index 78d1cea..64a6761 100644
@@ -133,6 +133,16 @@ so that a writing process does not remain blocked.
 In Linux versions before 2.6.11, the capacity of a pipe was the same as
 the system page size (e.g., 4096 bytes on i386).
 Since Linux 2.6.11, the pipe capacity is 65536 bytes.
+Since Linux 2.6.35, the pipe capacity can be queried and set using the
+.BR fcntl (2)
+.BR F_GETPIPE_SZ
+and
+.BR F_SETPIPE_SZ
+operations.
+See
+.BR fcntl (2)
+for more information.
+
 .SS PIPE_BUF
 POSIX.1-2001 says that
 .BR write (2)s
Signature · 6 lines
2.0.0

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#4 lore raw

Re: [PATCH 1/2] pipe.2: PIPE_BUF is defined in limits.h

In reply to a message not in the archive
Quoted 2 lines · Elie De Brauwer

To make use of PIPE_BUF in an application one should include limits.h. Adding a reference to this inclusion.

Thanks, Elie. Applied.

Cheers,

Michael

Quoted 21 lines
---
 man2/pipe.2 | 4 ++++
 1 file changed, 4 insertions(+)
man2/pipe.2 +4 -0
index a5ed2ea..7f1a1d0 100644
@@ -98,6 +98,10 @@ Writes of greater than
 bytes (see
 .BR pipe (7))
 will be split into multiple packets.
+The constant
+.BR PIPE_BUF
+is defined in
+.IR <limits.h> .
 .IP *
 If a
 .BR read (2)
Signature · 7 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#7 lore raw

Re: [PATCH 2/2] pipe.7: Add reference that the pipe capacity can be changed.

In reply to a message not in the archive
Quoted 3 lines · Elie De Brauwer

In fcntl(2) F_SETPIPE_SZ, F_GETPIPE_SZ and /proc/sys/fs/pipe-max-size are defined, however pipe(7) still defines the pipe capacity as being a static entity. Adding a reference to fcntl(2).

Hi Elie,

Thanks for that! Applied.

Cheers,

Michael

Quoted 27 lines
---
 man7/pipe.7 | 10 ++++++++++
 1 file changed, 10 insertions(+)
man7/pipe.7 +10 -0
index 78d1cea..64a6761 100644
@@ -133,6 +133,16 @@ so that a writing process does not remain blocked.
 In Linux versions before 2.6.11, the capacity of a pipe was the same as
 the system page size (e.g., 4096 bytes on i386).
 Since Linux 2.6.11, the pipe capacity is 65536 bytes.
+Since Linux 2.6.35, the pipe capacity can be queried and set using the
+.BR fcntl (2)
+.BR F_GETPIPE_SZ
+and
+.BR F_SETPIPE_SZ
+operations.
+See
+.BR fcntl (2)
+for more information.
+
 .SS PIPE_BUF
 POSIX.1-2001 says that
 .BR write (2)s
Signature · 7 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#8 lore raw

Re: [PATCH 2/2] pipe.7: Add reference that the pipe capacity can be changed.

In reply to a message not in the archive

Am 06.07.2014 15:44, schrieb Elie De Brauwer:

Quoted 17 lines

In fcntl(2) F_SETPIPE_SZ, F_GETPIPE_SZ and /proc/sys/fs/pipe-max-size are defined, however pipe(7) still defines the pipe capacity as being a static entity. Adding a reference to fcntl(2).

---
 man7/pipe.7 | 10 ++++++++++
 1 file changed, 10 insertions(+)
man7/pipe.7 +0 -0
index 78d1cea..64a6761 100644
@@ -133,6 +133,16 @@ so that a writing process does not remain blocked.
 In Linux versions before 2.6.11, the capacity of a pipe was the same as
 the system page size (e.g., 4096 bytes on i386).
 Since Linux 2.6.11, the pipe capacity is 65536 bytes.

man7/pipe.7 so that a writing process does not remain blocked. · line 145

Quoted 10 lines
man7/pipe.7 +10 -0
+Since Linux 2.6.35, the pipe capacity can be queried and set using the
+.BR fcntl (2)
+.BR F_GETPIPE_SZ
+and
+.BR F_SETPIPE_SZ
+operations.
+See
+.BR fcntl (2)
+for more information.
+

Could to add a line like:
"the default pipe capacity is still 65536 bytes." ? (or what ever)

re,
wh

man7/pipe.7 so that a writing process does not remain blocked. · line 148

Quoted 3 lines
man7/pipe.7 +0 -0
 .SS PIPE_BUF
 POSIX.1-2001 says that
 .BR write (2)s

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#10 lore raw

Re: [PATCH 2/2] pipe.7: Add reference that the pipe capacity can be changed.

In reply to a message not in the archive
Quoted 25 lines · walter harms

Am 06.07.2014 15:44, schrieb Elie De Brauwer:

Quoted 22 lines

In fcntl(2) F_SETPIPE_SZ, F_GETPIPE_SZ and /proc/sys/fs/pipe-max-size are defined, however pipe(7) still defines the pipe capacity as being a static entity. Adding a reference to fcntl(2).

---
 man7/pipe.7 | 10 ++++++++++
 1 file changed, 10 insertions(+)
man7/pipe.7 +5 -0
index 78d1cea..64a6761 100644
@@ -133,6 +133,16 @@ so that a writing process does not remain blocked.
 In Linux versions before 2.6.11, the capacity of a pipe was the same as
 the system page size (e.g., 4096 bytes on i386).
 Since Linux 2.6.11, the pipe capacity is 65536 bytes.
+Since Linux 2.6.35, the pipe capacity can be queried and set using the
+.BR fcntl (2)
+.BR F_GETPIPE_SZ
+and
+.BR F_SETPIPE_SZ
Quoted 8 lines

man7/pipe.7 so that a writing process does not remain blocked. · line 145

Quoted 5 lines
man7/pipe.7 +5 -0
+operations.
+See
+.BR fcntl (2)
+for more information.
+

Could to add a line like:
"the default pipe capacity is still 65536 bytes." ? (or what ever)

Yup, seems worthwhile. Added. Thanks, Walter.

Cheers,

Michael
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html