Subject: Re: [PATCH v2 1/3] compat/posix.h: track SA_RESTART fallback

From: Junio C Hamano <[email-masked]>
Date: Wed, 25 Jun 2025 17:45:19 -0700

"Carlo Marcelo Arenas Belón via GitGitGadget"
<[email-masked]> writes:

> +# Define USE_NON_POSIX_SIGNAL if don't have support for SA_RESTART or
> +# prefer to use ANSI C signal() over POSIX sigaction()
> +#

I may or may not have mentioned this, but this is not helpful enough
for folks, as there is no clue for users to decide if they "prefer".

We need to state how they need to decide between the use of
"signal()" and "sigaction()" in the affected codepath, especially
when they have both.

If their system lacks sigaction() at all, the decision may be
trivial, but the conditional compilation you are trying to achieve
in daemon.c is _not_ like "my system has both, so I can use either
one and the resulting binary works just fine".  Rather, "Even though
my platform has both, the sigaction() my system has is not quite
right in such and such way and I have to use signal(), unlike
everybody else, unfortunately".

It may cause us to rethink the name USE_NON_POSIX_SIGNAL; I though
I've already discussed this point in my response to the cover
letter.

Thanks.