io: handle errors on listening file descriptors.
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 9 Jan 2017 02:46:32 +0000 (13:16 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 9 Jan 2017 02:46:32 +0000 (13:16 +1030)
commitf08b8139fc7370224c59bc3178b887810b98592b
tree0846f80bab730be29faf643ffa67f4aebf4c4005
parent17a81baf84a9c8f89603173be3169a0a2017702d
io: handle errors on listening file descriptors.

While investigating the previous patch, a bug caused poll to return
POLLHUP on the listening socket, which caused us to spin.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ccan/io/io.h
ccan/io/poll.c
ccan/io/test/run-22-POLLHUP-on-listening-socket.c [new file with mode: 0644]