diff options
author | Ben Gamari <ben@smart-cactus.org> | 2016-04-21 13:57:18 +0200 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-05-01 23:29:49 +0200 |
commit | df9b772a40d7cbbad260f29211fe6cd0bb119908 (patch) | |
tree | 6797f0cc7161f279040e4a1ce11a50e727b7e7cc /rts/posix/itimer | |
parent | 65e13f66c595ad75bd6e9a55496f1372ead2731d (diff) | |
download | haskell-df9b772a40d7cbbad260f29211fe6cd0bb119908.tar.gz |
Catch errors from timerfd_settime
Diffstat (limited to 'rts/posix/itimer')
-rw-r--r-- | rts/posix/itimer/Pthread.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/rts/posix/itimer/Pthread.c b/rts/posix/itimer/Pthread.c index e84a53a058..2133a5b454 100644 --- a/rts/posix/itimer/Pthread.c +++ b/rts/posix/itimer/Pthread.c @@ -105,7 +105,10 @@ static void *itimer_thread_func(void *_handle_tick) if (!TFD_CLOEXEC) { fcntl(timerfd, F_SETFD, FD_CLOEXEC); } - int ret = timerfd_settime(timerfd, 0, &it, NULL); + if (timerfd_settime(timerfd, 0, &it, NULL)) { + sysErrorBelch("timerfd_settime"); + stg_exit(EXIT_FAILURE); + } #endif while (1) { |