Re: [PATCH v2 1/3] compat/posix.h: track SA_RESTART fallback
- From
Carlo Marcelo Arenas Belón <carenas@gmail.com>
- Date
- Jun 25, 2025, 22:24 UTC
- Message-ID
- <4oh4eatsp4wo4ur6rluy6ickfy5jfpuarg435vplrqzvk3eaiz@jbtnnwqnz2yi>
- In-Reply-To
- <xmqq4iw3yfd8.fsf@gitster.g>
On Wed, Jun 25, 2025 at 09:07:15AM -0800, Junio C Hamano wrote:
Show 15 quoted lines
> "Carlo Marcelo Arenas Belón via GitGitGadget" > <gitgitgadget@gmail.com> writes: > > > +# Define USE_NON_POSIX_SIGNAL if don't have support for SA_RESTART or > > +# prefer using ANSI C signal() over POSIX sigaction() > > + > > +AC_CACHE_CHECK([whether SA_RESTART is supported], [ac_cv_siginterrupt], [ > > + AC_COMPILE_IFELSE( > > + [AC_LANG_PROGRAM([#include <signal.h>], [[ > > + #ifdef SA_RESTART > > + #endif > > + siginterrupt(SIGCHLD, 1) > > This is curious. What is this #ifdef/#endif doing that does not > have anything in it?
It checks that `SA_RESTART` is defined in `signal.h`, which should fail at least in QNX, NonStop and Windows.
Carlo