Thread (31 messages) 31 messages, 4 authors, 2025-07-10

Re: [PATCH v3 0/4] daemon: explicitly allow EINTR during poll()

From: Carlo Marcelo Arenas Belón <hidden>
Date: 2025-07-09 17:04:58

On Wed, Jul 09, 2025 at 03:12:43PM -0800, Phillip Wood wrote:
On 26/06/2025 09:53, Carlo Marcelo Arenas Belón via GitGitGadget wrote:
quoted
This series addresses and ambiguity that is at least visible in OpenBSD,
where zombie proceses would only be cleared after a new connection is
received.

The underlying problem is that when this code was originally introduced,
SA_RESTART was not widely implemented, and the signal() call usually
implemented SysV like semantics, at least until it started being
reimplemented by calling sigaction() internally.
I'm all in favor of using sigaction() but I think the SA_RESTART parts of
this series are an unnecessary complication that has the potential to hide
bugs as we support platforms without SA_RESTART.
True, but those platforms (except for Windows, which is otherwise not that
relevant as it doesn't fail system calls with EINTR anyway) don't have that
many users and are therefore less likely to uncover any possible issues with
their use cases.

I know patch 4 looks silly, by enabling SA_RESTART just to disable it around
poll(), but it addresses the root cause of the problem stated originally,
which is that we are very likely to have SA_RESTART enabled on SIGCHLD and
relying on the system to excempt poll() from it.

Carlo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help