diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2018-06-21 17:00:32 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-06-22 15:58:13 -0400 |
commit | c7b1e93b47915a5276dfdb04f09030f5abaed290 (patch) | |
tree | e07471faa512c452cf2387aee4563593c3cbad3b /rts | |
parent | 63d474bb4af80c1282ee4a4da136ac4518d98bff (diff) | |
download | haskell-c7b1e93b47915a5276dfdb04f09030f5abaed290.tar.gz |
rts: Abort if timerfd read fails
Currently we belch some output to stderr but fail to abort, resulting in
a busy loop. Fixes #15292.
Test Plan:
* Validate
* try running program under environment without timerfd capabilities;
ensure we don't busy-loop
Reviewers: simonmar, erikd
Reviewed By: simonmar
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #15929
Differential Revision: https://phabricator.haskell.org/D4875
Diffstat (limited to 'rts')
-rw-r--r-- | rts/posix/itimer/Pthread.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/posix/itimer/Pthread.c b/rts/posix/itimer/Pthread.c index f591d5eb73..d8f2497e3f 100644 --- a/rts/posix/itimer/Pthread.c +++ b/rts/posix/itimer/Pthread.c @@ -123,7 +123,7 @@ static void *itimer_thread_func(void *_handle_tick) if (USE_TIMERFD_FOR_ITIMER) { if (read(timerfd, &nticks, sizeof(nticks)) != sizeof(nticks)) { if (errno != EINTR) { - sysErrorBelch("Itimer: read(timerfd) failed"); + barf("Itimer: read(timerfd) failed"); } } } else { |