Use an explicit job state instead of avoid closing our side of the
authornicm <nicm@openbsd.org>
Wed, 17 Jun 2015 16:44:49 +0000 (16:44 +0000)
committernicm <nicm@openbsd.org>
Wed, 17 Jun 2015 16:44:49 +0000 (16:44 +0000)
commit7ef73ed3f277d336c450548fbd91891fae8c6ef3
tree8e7972338f27c5aed4367271a2f8d02df8381ead
parentff5e8b88a0ddf0589ce85dd5d0861293b299abdd
Use an explicit job state instead of avoid closing our side of the
socketpair and setting it to -1 to mark when the other side is
closed. This avoids closing it while the libevent bufferevent still has
it (it could try to add it to the polled set which some mechanisms don't
like). Fixes part a problem reported by Bruno Sutic.
usr.bin/tmux/job.c
usr.bin/tmux/tmux.h