summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-run-shell.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tmux/cmd-run-shell.c')
-rw-r--r--usr.bin/tmux/cmd-run-shell.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/tmux/cmd-run-shell.c b/usr.bin/tmux/cmd-run-shell.c
index 1692bb4526d..310f3d1c7d1 100644
--- a/usr.bin/tmux/cmd-run-shell.c
+++ b/usr.bin/tmux/cmd-run-shell.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-run-shell.c,v 1.6 2009/11/13 19:53:29 nicm Exp $ */
+/* $OpenBSD: cmd-run-shell.c,v 1.7 2010/05/25 20:05:25 nicm Exp $ */
/*
* Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org>
@@ -82,6 +82,11 @@ cmd_run_shell_callback(struct job *job)
int retcode;
u_int lines;
+ if (ctx->cmdclient != NULL && ctx->cmdclient->flags & CLIENT_DEAD)
+ return;
+ if (ctx->curclient != NULL && ctx->curclient->flags & CLIENT_DEAD)
+ return;
+
lines = 0;
do {
if ((line = evbuffer_readline(job->event->input)) != NULL) {