projects
/
ccan
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
94b797a
)
failtest: handle EINTR from poll.
author
Rusty Russell
<rusty@rustcorp.com.au>
Fri, 25 Mar 2011 01:16:17 +0000
(11:46 +1030)
committer
Rusty Russell
<rusty@rustcorp.com.au>
Fri, 25 Mar 2011 01:16:17 +0000
(11:46 +1030)
I don't quite know why, but this started happening to me. We should
handle it anyway.
ccan/failtest/failtest.c
patch
|
blob
|
history
diff --git
a/ccan/failtest/failtest.c
b/ccan/failtest/failtest.c
index 0f2ab0c7f2cda15464d0ee7dc81b16d34e25b602..7a6f5220e60cd5ed7d1035922b267751c999a84e 100644
(file)
--- a/
ccan/failtest/failtest.c
+++ b/
ccan/failtest/failtest.c
@@
-483,8
+483,13
@@
static bool should_fail(struct failtest_call *call)
else
ret = poll(pfd, 2, failtest_timeout_ms);
- if (ret
<
= 0)
+ if (ret
=
= 0)
hand_down(SIGUSR1);
+ if (ret < 0) {
+ if (errno == EINTR)
+ continue;
+ err(1, "Poll returned %i", ret);
+ }
if (pfd[0].revents & POLLIN) {
ssize_t len;