]> git.ipfire.org Git - thirdparty/strongswan.git/commit
watcher: Proper handle poll() POLLHUP/NVAL signaling
authorMartin Willi <martin@revosec.ch>
Fri, 28 Nov 2014 11:36:10 +0000 (12:36 +0100)
committerMartin Willi <martin@revosec.ch>
Fri, 28 Nov 2014 11:50:34 +0000 (12:50 +0100)
commit015fb3134db41ca9901ec5c895b15f5a37590ddc
treed6567345e1796db903d3d3dcce2b2abc84a0b8d9
parent02fd29acc14630a553ec67f008865859e30859e9
watcher: Proper handle poll() POLLHUP/NVAL signaling

poll() may return POLLHUP or POLLNVAL for given file descriptors. To handle
these properly, we signal them to the EXCEPT watcher state, if registered. If
not, we call the read/write callbacks, so they can properly fail when trying
to read from or write to the file descriptor.
src/libstrongswan/processing/watcher.c