* re-listen(2) (was: <linux-man@vger.kernel.org>)
[not found] <59f9ef34-e9d9-41d5-8f97-2c070532a7d0@m2osw.com>
@ 2024-03-24 20:15 ` Alejandro Colomar
2024-03-24 20:23 ` listen(2) man page enhancement Alexis Wilke
1 sibling, 0 replies; 2+ messages in thread
From: Alejandro Colomar @ 2024-03-24 20:15 UTC (permalink / raw)
To: Alexis Wilke; +Cc: linux-man, netdev
[-- Attachment #1: Type: text/plain, Size: 2223 bytes --]
Hi Alexis,
I've fixed the subject, and CC. You didn't send the mail to linux-man@.
I've also CCd netdev@, since they probably know better.
On Sun, Mar 24, 2024 at 10:16:02AM -0700, Alexis Wilke wrote:
> Hi Alejandro,
>
> I was looking at changing the "backlog" of a listen(2) call and could not
> find any documentation on how to do so.
>
> Clearly, it is possible under Linux simply by calling listen(2) again.
> However, the documentation does not mention the possibility.
Hmm, I see that POSIX doesn't specify either.
I didn't find it documented in linux.git/Documentation/ either (but I
only had a quick look; maybe it's there).
> We see on this stackoverflow post that it is how Nginx does it (see answer).
Nginx is known to abuse implementation details, and one shouldn't
necessarily trust what it does to be public API.
However, yeah, probably the kernel doesn't want to break Nginx, so maybe
we need to document it. I'm not sure if this is a violation of POSIX,
though. Maybe someone from netdev@ can confirm?
> https://stackoverflow.com/questions/64050281/can-backlog-value-that-is-passed-to-listen-call-be-modified-later-on-without-c
>
> I would propose to either add a new paragraph or add one sentence to the
> existing "backlog" paragraph to mention the ability.
>
> Here is the existing paragraph:
>
> The backlog argument defines the maximum length to which the
> queue of pending connections for sockfd may grow. If a connection
> request arrives when the queue is full, the client may receive an
> error
> with an indication of ECONNREFUSED or, if the underlying
> protocol supports retransmission, the request may be ignored so
> that a later reattempt at connection succeeds.
>
> What I propose is to add the following sentence to that paragraph:
>
> It is possible to call listen() again to change the the size of the
> backlog queue.
Let's see what netdev@ says.
Have a lovely night!
Alex
>
> Thank you.
> Alexis
>
--
<https://www.alejandro-colomar.es/>
Looking for a remote C programming job at the moment.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* listen(2) man page enhancement
[not found] <59f9ef34-e9d9-41d5-8f97-2c070532a7d0@m2osw.com>
2024-03-24 20:15 ` re-listen(2) (was: <linux-man@vger.kernel.org>) Alejandro Colomar
@ 2024-03-24 20:23 ` Alexis Wilke
1 sibling, 0 replies; 2+ messages in thread
From: Alexis Wilke @ 2024-03-24 20:23 UTC (permalink / raw)
To: Alejandro Colomar; +Cc: linux-man
[-- Attachment #1.1.1: Type: text/plain, Size: 1321 bytes --]
Hi Alejandro,
I was looking at changing the "backlog" of a listen(2) call and could
not find any documentation on how to do so.
Clearly, it is possible under Linux simply by calling listen(2) again.
However, the documentation does not mention the possibility.
We see on this stackoverflow post that it is how Nginx does it (see
answer).
https://stackoverflow.com/questions/64050281/can-backlog-value-that-is-passed-to-listen-call-be-modified-later-on-without-c
I would propose to either add a new paragraph or add one sentence to the
existing "backlog" paragraph to mention the ability.
Here is the existing paragraph:
The backlog argument defines the maximum length to which the
queue of pending connections for sockfd may grow. If a connection
request arrives when the queue is full, the client may receive
an error
with an indication of ECONNREFUSED or, if the underlying
protocol supports retransmission, the request may be ignored so
that a later reattempt at connection succeeds.
What I propose is to add the following sentence to that paragraph:
It is possible to call listen() again to change the the size of the
backlog queue.
Thank you.
Alexis
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 2505 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 665 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-03-24 20:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <59f9ef34-e9d9-41d5-8f97-2c070532a7d0@m2osw.com>
2024-03-24 20:15 ` re-listen(2) (was: <linux-man@vger.kernel.org>) Alejandro Colomar
2024-03-24 20:23 ` listen(2) man page enhancement Alexis Wilke
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox