summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-run-shell.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2010-05-25 20:05:25 +0000
committernicm <nicm@openbsd.org>2010-05-25 20:05:25 +0000
commit034cc75fe36c8aa03d809b68f276672fb072b54e (patch)
tree99345f2105733d4b7c7c6aaf337f7518ef3c83f6 /usr.bin/tmux/cmd-run-shell.c
parentActively remove processes from the runqueues of a CPU when we stop it. (diff)
downloadwireguard-openbsd-034cc75fe36c8aa03d809b68f276672fb072b54e.tar.xz
wireguard-openbsd-034cc75fe36c8aa03d809b68f276672fb072b54e.zip
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/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) {