projects
/
ccan
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
118708e
)
io: don't fail if we get a signal.
author
Rusty Russell
<rusty@rustcorp.com.au>
Sun, 4 Feb 2018 23:31:51 +0000
(10:01 +1030)
committer
Rusty Russell
<rusty@rustcorp.com.au>
Sun, 4 Feb 2018 23:31:51 +0000
(10:01 +1030)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ccan/io/poll.c
patch
|
blob
|
history
diff --git
a/ccan/io/poll.c
b/ccan/io/poll.c
index 3354abe01a2bae38ae6728b9f9f07522053b90b2..b005a97e4b1d07879a4e281a8d48276baaac2fa1 100644
(file)
--- a/
ccan/io/poll.c
+++ b/
ccan/io/poll.c
@@
-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];