Duncan Coutts pushed to branch wip/dcoutts/signals-cleanup at Glasgow Haskell Compiler / GHC Commits: 1e290feb by Duncan Coutts at 2026-11-12T15:27:15+00:00 FIXUP Push installUserSignalHandler down into individual I/O managers Fix header includes - - - - - 6 changed files: - rts/posix/MIO.h - rts/posix/Poll.c - rts/posix/Poll.h - rts/posix/Select.h - rts/posix/SelectBis.h - rts/posix/UserSignals.c Changes: ===================================== rts/posix/MIO.h ===================================== @@ -10,8 +10,8 @@ #include "IOManager.h" -#if defined(HAVE_SIGNAL_H) -# include <signal.h> +#if defined(RTS_USER_SIGNALS) +#include <signal.h> #endif #include "BeginPrivate.h" @@ -26,8 +26,11 @@ void ioManagerStart (void); void ioManagerStartCap (/* inout */ Capability **cap); void interruptIOManagerFromSignalMIO(void); + +#if defined(RTS_USER_SIGNALS) int installUserSignalHandlerMIO(int sig, int spi, sigset_t *mask, bool nocldstop); #endif +#endif #include "EndPrivate.h" ===================================== rts/posix/Poll.c ===================================== @@ -34,7 +34,6 @@ */ #define _GNU_SOURCE 1 #define __BSD_VISIBLE 1 -#include <signal.h> #include <poll.h> #endif ===================================== rts/posix/Poll.h ===================================== @@ -12,6 +12,10 @@ #include "IOManager.h" +#if defined(RTS_USER_SIGNALS) +#include <signal.h> +#endif + #include "BeginPrivate.h" #if defined(IOMGR_ENABLED_POLL) ===================================== rts/posix/Select.h ===================================== @@ -8,6 +8,10 @@ #pragma once +#if defined(RTS_USER_SIGNALS) +#include <signal.h> +#endif + #include "BeginPrivate.h" // An absolute time value in units of 10ms. ===================================== rts/posix/SelectBis.h ===================================== @@ -32,6 +32,10 @@ #include "IOManager.h" +#if defined(RTS_USER_SIGNALS) +#include <signal.h> +#endif + #include "BeginPrivate.h" #if defined(IOMGR_ENABLED_SELECTBIS) ===================================== rts/posix/UserSignals.c ===================================== @@ -26,7 +26,6 @@ #endif #include <unistd.h> -#include <signal.h> #include <fcntl.h> #include <string.h> View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1e290feb35c40bbf5a1bb1817a164ade... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1e290feb35c40bbf5a1bb1817a164ade... You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help