[Git][ghc/ghc][master] rts: Fix EINTR check in timerfd ticker
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Sat Nov 16 10:28:10 UTC 2024
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
2c427cb0 by Ben Gamari at 2024-11-16T05:27:40-05:00
rts: Fix EINTR check in timerfd ticker
When `poll` failed we previously checked that `errno == -EINTR` to
silence the failure warning. However, this is wrong as `errno` values
are generally not negated error codes (in contrast to many system call
results, which is likely what the original author had in mind).
Fixes #25477.
- - - - -
1 changed file:
- rts/posix/ticker/TimerFd.c
Changes:
=====================================
rts/posix/ticker/TimerFd.c
=====================================
@@ -115,7 +115,7 @@ static void *itimer_thread_func(void *_handle_tick)
// While the RTS attempts to mask signals, some foreign libraries
// may rely on signal delivery may unmask them. Consequently we may
// see EINTR. See #24610.
- if (errno != -EINTR) {
+ if (errno != EINTR) {
sysErrorBelch("Ticker: poll failed: %s", strerror(errno));
}
}
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/2c427cb02f7c31398053383d9e9051b55cee7139
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/2c427cb02f7c31398053383d9e9051b55cee7139
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20241116/7c4a49b4/attachment.html>
More information about the ghc-commits
mailing list