On 22/11/2025 04:59, Collin Funk wrote:

I wonder if we can remove the fallback for platforms without
sigaction. Gnulib doesn't document it missing for any platforms other
than Windows, which it has a implementation for [1]. WDYT?

Good point. We already depend on the sigaction gnulib module.
In fact csplit depends on sigaction being available since 2008:
https://github.com/coreutils/coreutils/commit/ddc409b59
I'll post a follow up to also do this for ls,dd,sort.

+static int const term_sig[] =
+  {
+    SIGALRM, /* our timeout.  */
+    SIGINT,  /* Ctrl-C at terminal for example.  */
+    SIGQUIT, /* Ctrl-\ at terminal for example.  */
+    SIGHUP,  /* terminal closed for example.  */
+    SIGTERM, /* if terminated, stop monitored proc.  */
+
+    SIGPIPE, SIGUSR1, SIGUSR2,
+
+    SIGILL, SIGTRAP, SIGABRT, SIGBUS, SIGFPE, SIGSEGV,
+
+# ifdef SIGXCPU
+    SIGXCPU,
+# endif
+# ifdef SIGXFSZ
+    SIGXFSZ,
+# endif
+# ifdef SIGSYS
+    SIGSYS,
+# endif
+# ifdef SIGVTALRM
+    SIGVTALRM,
+# endif
+# ifdef SIGPROF
+    SIGPROF,
+# endif
+# ifdef SIGPOLL
+    SIGPOLL,
+# endif
+# ifdef SIGPWR
+    SIGPWR,
+# endif
+# ifdef SIGSTKFLT
+    SIGSTKFLT,
+# endif
+  };

Should we #ifdef any of the signals not specified by ISO C? That is
SIGABRT, SIGFPE, SIGILL, SIGINT, SIGSEGV, and SIGTERM.

I don't think that is needed. We can add ifdefs if we every hit a build issue.

BTW I've also added SIGBREAK and SIGEMT to the list.

thanks,
Padraig

Reply via email to