Skip to contentSkip to conversation

wfix: accept4(2) SOCK_NONBLOCK flag

PATCH In review Jan "Yenya" Kasprzak 2 participants 4 messages Aug 6, 2024 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wfix: accept4(2) SOCK_NONBLOCK flag

The description of SOCK_NONBLOCK is a bit confusing:
"description" versus "descriptor", "open file" instead of "new file".

---
 man/man2/accept.2 | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
man/man2/accept.2 +7 -6
index afc04603c..65a56e37f 100644
@@ -124,12 +124,13 @@ The following values can be bitwise ORed in
 to obtain different behavior:
 .TP 16
 .B SOCK_NONBLOCK
-Set the
-.B O_NONBLOCK
-file status flag on the open file description (see
-.BR open (2))
-referred to by the new file descriptor.
-Using this flag saves extra calls to
+Set the non-blocking
+.B ( O_NONBLOCK )
+file status flag on the new file descriptor.
+See the description of this flag in
+.BR open (2)
+for details.
+Using this flag saves an extra call to
 .BR fcntl (2)
 to achieve the same result.
 .TP
Signature · 7 lines
2.45.2

-- 
| Jan "Yenya" Kasprzak <kas at {fi.muni.cz - work | yenya.net - private}> |
| https://www.fi.muni.cz/~kas/                        GPG: 4096R/A45477D5 |
    We all agree on the necessity of compromise. We just can't agree on
    when it's necessary to compromise.                     --Larry Wall
#1 lore raw

Hello Jan,

Quoted 2 lines · Jan "Yenya" Kasprzak

The description of SOCK_NONBLOCK is a bit confusing:
"description" versus "descriptor", "open file" instead of "new file".

The "open file description" is a very specific thing. See
<https://biriukov.dev/docs/fd-pipe-session-terminal/1-file-descriptor-and-open-file-description/>

Have a lovely day!
Alex

Quoted 38 lines
---
 man/man2/accept.2 | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
man/man2/accept.2 +7 -6
index afc04603c..65a56e37f 100644
@@ -124,12 +124,13 @@ The following values can be bitwise ORed in
 to obtain different behavior:
 .TP 16
 .B SOCK_NONBLOCK
-Set the
-.B O_NONBLOCK
-file status flag on the open file description (see
-.BR open (2))
-referred to by the new file descriptor.
-Using this flag saves extra calls to
+Set the non-blocking
+.B ( O_NONBLOCK )
+file status flag on the new file descriptor.
+See the description of this flag in
+.BR open (2)
+for details.
+Using this flag saves an extra call to
 .BR fcntl (2)
 to achieve the same result.
 .TP
Signature · 7 lines
2.45.2

-- 
| Jan "Yenya" Kasprzak <kas at {fi.muni.cz - work | yenya.net - private}> |
| https://www.fi.muni.cz/~kas/                        GPG: 4096R/A45477D5 |
    We all agree on the necessity of compromise. We just can't agree on
    when it's necessary to compromise.                     --Larry Wall
Signature · 1 line
<https://www.alejandro-colomar.es/>
#2 lore raw

Hello, Alejandro,

I was unaware of "struct file" being called "open file description". Sorry for the noise then.

Regards,

-Yenya

Quoted 53 lines · Alejandro Colomar

Hello Jan,

Quoted 2 lines · Jan "Yenya" Kasprzak

The description of SOCK_NONBLOCK is a bit confusing:
"description" versus "descriptor", "open file" instead of "new file".

The "open file description" is a very specific thing. See
<https://biriukov.dev/docs/fd-pipe-session-terminal/1-file-descriptor-and-open-file-description/>

Have a lovely day!
Alex

Quoted 38 lines
---
 man/man2/accept.2 | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
man/man2/accept.2 +7 -6
index afc04603c..65a56e37f 100644
@@ -124,12 +124,13 @@ The following values can be bitwise ORed in
 to obtain different behavior:
 .TP 16
 .B SOCK_NONBLOCK
-Set the
-.B O_NONBLOCK
-file status flag on the open file description (see
-.BR open (2))
-referred to by the new file descriptor.
-Using this flag saves extra calls to
+Set the non-blocking
+.B ( O_NONBLOCK )
+file status flag on the new file descriptor.
+See the description of this flag in
+.BR open (2)
+for details.
+Using this flag saves an extra call to
 .BR fcntl (2)
 to achieve the same result.
 .TP
Signature · 7 lines
2.45.2

-- 
| Jan "Yenya" Kasprzak <kas at {fi.muni.cz - work | yenya.net - private}> |
| https://www.fi.muni.cz/~kas/                        GPG: 4096R/A45477D5 |
    We all agree on the necessity of compromise. We just can't agree on
    when it's necessary to compromise.                     --Larry Wall
Signature · 1 line
<https://www.alejandro-colomar.es/>
Signature · 4 lines
| Jan "Yenya" Kasprzak <kas at {fi.muni.cz - work | yenya.net - private}> |
| https://www.fi.muni.cz/~kas/                        GPG: 4096R/A45477D5 |
    We all agree on the necessity of compromise. We just can't agree on
    when it's necessary to compromise.                     --Larry Wall
#3 lore raw

Hi Jan,

Quoted 4 lines · Jan "Yenya" Kasprzak

Hello, Alejandro,

I was unaware of "struct file" being called "open file description". Sorry for the noise then.

I didn't know it was called 'struct file' within linux. Good to know! :)

Thanks,
Alex

Quoted 67 lines

Regards,

-Yenya

Quoted 53 lines · Alejandro Colomar

Hello Jan,

Quoted 2 lines · Jan "Yenya" Kasprzak

The description of SOCK_NONBLOCK is a bit confusing:
"description" versus "descriptor", "open file" instead of "new file".

The "open file description" is a very specific thing. See
<https://biriukov.dev/docs/fd-pipe-session-terminal/1-file-descriptor-and-open-file-description/>

Have a lovely day!
Alex

Quoted 38 lines
---
 man/man2/accept.2 | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
man/man2/accept.2 +7 -6
index afc04603c..65a56e37f 100644
@@ -124,12 +124,13 @@ The following values can be bitwise ORed in
 to obtain different behavior:
 .TP 16
 .B SOCK_NONBLOCK
-Set the
-.B O_NONBLOCK
-file status flag on the open file description (see
-.BR open (2))
-referred to by the new file descriptor.
-Using this flag saves extra calls to
+Set the non-blocking
+.B ( O_NONBLOCK )
+file status flag on the new file descriptor.
+See the description of this flag in
+.BR open (2)
+for details.
+Using this flag saves an extra call to
 .BR fcntl (2)
 to achieve the same result.
 .TP
Signature · 7 lines
2.45.2

-- 
| Jan "Yenya" Kasprzak <kas at {fi.muni.cz - work | yenya.net - private}> |
| https://www.fi.muni.cz/~kas/                        GPG: 4096R/A45477D5 |
    We all agree on the necessity of compromise. We just can't agree on
    when it's necessary to compromise.                     --Larry Wall
Signature · 1 line
<https://www.alejandro-colomar.es/>
Signature · 4 lines
| Jan "Yenya" Kasprzak <kas at {fi.muni.cz - work | yenya.net - private}> |
| https://www.fi.muni.cz/~kas/                        GPG: 4096R/A45477D5 |
    We all agree on the necessity of compromise. We just can't agree on
    when it's necessary to compromise.                     --Larry Wall
Signature · 1 line
<https://www.alejandro-colomar.es/>