Commit b0a59bdc authored by Rusty Russell's avatar Rusty Russell

failtest: handle EINTR from poll.

I don't quite know why, but this started happening to me.  We should
handle it anyway.
parent 94b797a5
......@@ -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;
......
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