summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2014-10-09 16:36:36 +0000
committermillert <millert@openbsd.org>2014-10-09 16:36:36 +0000
commit25ff029fde333a8ef7edbddb068057e2ce24d571 (patch)
tree915b93d2551f9f4557a22dacace15918b1c36cd3 /lib
parentparse and render "from" and "to" clauses in eqn, and render matrices; (diff)
downloadwireguard-openbsd-25ff029fde333a8ef7edbddb068057e2ce24d571.tar.xz
wireguard-openbsd-25ff029fde333a8ef7edbddb068057e2ce24d571.zip
Instead of trying to emulate select/poll semantics with respect to EOF
by mutating so_state before calling soo_poll(), call soo_poll() normally but avoid setting SS_CANTRCVMORE in the reader's so_state on first open. This fixes EOF detection in select/poll on the reader side when the write side is closed. Also set SS_ISDISCONNECTED when the writer count reaches zero so POLLHUP is set in revents. Unlike Unix domain sockets, we need to clear the EOF indicator after it has been read so that subsequent reads will block waiting for a new writer. This now passes regress.
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions