Commit e2d15a2b authored by Rusty Russell's avatar Rusty Russell

io: don't fail if we get a signal.

Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 118708ed
......@@ -280,8 +280,13 @@ void *io_loop(struct timers *timers, struct timer **expired)
}
r = pollfn(pollfds, num_fds, ms_timeout);
if (r < 0)
if (r < 0) {
/* Signals shouldn't break us, unless they set
* io_loop_return. */
if (errno == EINTR)
continue;
break;
}
for (i = 0; i < num_fds && !io_loop_return; i++) {
struct io_conn *c = (void *)fds[i];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment