[Git][ghc/ghc][wip/T25477] rts: Fix EINTR check in timerfd ticker
Ben Gamari (@bgamari)
gitlab at gitlab.haskell.org
Fri Nov 15 15:59:56 UTC 2024
Ben Gamari pushed to branch wip/T25477 at Glasgow Haskell Compiler / GHC
Commits:
a8bf3b75 by Ben Gamari at 2024-11-15T10:59:16-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/a8bf3b75b362011885b9966cfa696798bea27950
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a8bf3b75b362011885b9966cfa696798bea27950
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/20241115/6bbe2970/attachment.html>
More information about the ghc-commits
mailing list