From 6ce537927c04b37a29c1663e0c5aa82be57bca95 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 17 Jun 2015 16:44:50 +0000 Subject: 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/tmux.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'usr.bin/tmux/tmux.h') 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 @@ -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; -- cgit v1.2.3