diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2015-06-17 16:44:50 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2015-06-17 16:44:50 +0000 |
commit | 6ce537927c04b37a29c1663e0c5aa82be57bca95 (patch) | |
tree | 109e5e065f71534d860ec39c8bc5e754d14433e5 /usr.bin/tmux/tmux.h | |
parent | bc1d0920222aff29345641a31356bd22b2764904 (diff) |
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.
Diffstat (limited to 'usr.bin/tmux/tmux.h')
-rw-r--r-- | usr.bin/tmux/tmux.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h index ce057af9360..36a9648dfc1 100644 --- a/usr.bin/tmux/tmux.h +++ b/usr.bin/tmux/tmux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tmux.h,v 1.524 2015/06/15 10:58:01 nicm Exp $ */ +/* $OpenBSD: tmux.h,v 1.525 2015/06/17 16:44:49 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -714,6 +714,12 @@ struct options { /* Scheduled job. */ struct job { + enum { + JOB_RUNNING, + JOB_DEAD, + JOB_CLOSED + } state; + char *cmd; pid_t pid; int status; |