[PATCH] Fix scoped_ignore_sigpipe selftest on systems with BSD signal semantics

Tom Tromey tom@tromey.com
Tue Jun 22 13:49:27 GMT 2021


Pedro> Fix this by using sigaction.  I'm not adding the usual #ifdef
Pedro> HAVE_SIGACTION goo, because I really want to believe that all systems
Pedro> that support SIGPIPE support sigaction nowadays.  GNU/Linux, Hurd,
Pedro> BSDs, macOS, Cygwin, DJGPP, AIX, etc., anything resembling a modern
Pedro> Unix does support it AFAIK, only mingw does not support it, but OTOH,
Pedro> it also doesn't define SIGPIPE.  Confirmed by cross building GDB for
Pedro> mingw-w64.

gnulib seems to agree:

https://www.gnu.org/software/gnulib/manual/html_node/sigprocmask.html

Pedro> We could probably remove the HAVE_SIGPROCMASK check too, actually.

Sounds good.

Tom


More information about the Gdb-patches mailing list