summaryrefslogtreecommitdiff
path: root/usr.bin/tmux
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2010-05-25 20:05:26 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2010-05-25 20:05:26 +0000
commitd03d4b54a9b4096ec5f9b84e8af1c08314fdd75e (patch)
tree078e678954c78e0566c48192e19455bb646c83b5 /usr.bin/tmux
parentfa6c36de7e6cd7c0c10c3dd3fe982de6c0ce3ff8 (diff)
Don't die if the client has been detached when the job finishes, just
don't display the output.
Diffstat (limited to 'usr.bin/tmux')
-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) {