Skip to content
Snippets Groups Projects
Commit 3a0642ea authored by Ben Gamari's avatar Ben Gamari Committed by Marge Bot
Browse files

rts: Ignore EINTR while polling in timerfd itimer implementation

While the RTS does attempt to mask signals, it may be that a foreign
library unmasks them. This previously caused benign warnings which we
now ignore.

See #24610.
parent 9f99126a
No related branches found
No related tags found
No related merge requests found
......@@ -112,7 +112,12 @@ static void *itimer_thread_func(void *_handle_tick)
TSAN_ANNOTATE_BENIGN_RACE(&exited, "itimer_thread_func");
while (!RELAXED_LOAD(&exited)) {
if (poll(pollfds, 2, -1) == -1) {
sysErrorBelch("Ticker: poll failed: %s", strerror(errno));
// 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) {
sysErrorBelch("Ticker: poll failed: %s", strerror(errno));
}
}
// We check the pipe first, even though the timerfd may also have triggered.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment