[Git][ghc/ghc][wip/dcoutts/signals-cleanup] 3 commits: Try to fix freebsd builds
Duncan Coutts pushed to branch wip/dcoutts/signals-cleanup at Glasgow Haskell Compiler / GHC Commits: d39757d8 by Duncan Coutts at 2026-11-11T21:21:42+00:00 Try to fix freebsd builds If it works, then FIXUP into: Extract and add more utility functions for the signal self-pipe trick - - - - - 08b0bccf by Duncan Coutts at 2026-11-11T21:43:42+00:00 FIXUP Stop using signal-unsafe functions in signal handlers - - - - - b21a1e18 by Duncan Coutts at 2026-11-11T21:45:05+00:00 FIXUP Redo the scheme for special fds in the poll and selectbis I/O managers - - - - - 4 changed files: - rts/posix/Poll.c - rts/posix/Select.c - rts/posix/SelectBis.c - rts/posix/UserSignals.c Changes: ===================================== rts/posix/Poll.c ===================================== @@ -445,7 +445,7 @@ static void processSpecialFd(CapIOManager *iomgr USED_IF_PREEMPTION, { ASSERT(aiop->notify_type == NotifyInternal); enum SpecialFd special_fd_kind = aiop->internal; - int fd = aiop->fd USED_IF_PREEMPTION; + int fd USED_IF_PREEMPTION = aiop->fd; switch (special_fd_kind) { #if defined(HAVE_PREEMPTION) ===================================== rts/posix/Select.c ===================================== @@ -583,7 +583,7 @@ signal_handler(int sig STG_UNUSED, siginfo_t *info, void *p STG_UNUSED) * printing error message and use of _exit over stg_exit. */ char * msg = "too many pending signals\n"; - write(2, msg, strlen(msg)); + int r STG_UNUSED = write(2, msg, strlen(msg)); _exit(EXIT_FAILURE); } ===================================== rts/posix/SelectBis.c ===================================== @@ -449,7 +449,7 @@ static void processSpecialFd(CapIOManager *iomgr USED_IF_PREEMPTION, { ASSERT(aiop->notify_type == NotifyInternal); enum SpecialFd special_fd_kind = aiop->internal; - int fd = aiop->fd USED_IF_PREEMPTION; + int fd USED_IF_PREEMPTION = aiop->fd; switch (special_fd_kind) { #if defined(HAVE_PREEMPTION) ===================================== rts/posix/UserSignals.c ===================================== @@ -23,7 +23,6 @@ #if defined(HAVE_PIPE2) #define _GNU_SOURCE 1 -#define __BSD_VISIBLE 1 #endif #include <unistd.h> View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/58094db1ce225e47b92fd65151ded4d... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/58094db1ce225e47b92fd65151ded4d... 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
participants (1)
-
Duncan Coutts (@dcoutts)