diff options
author | 2010-05-25 20:05:25 +0000 | |
---|---|---|
committer | 2010-05-25 20:05:25 +0000 | |
commit | 034cc75fe36c8aa03d809b68f276672fb072b54e (patch) | |
tree | 99345f2105733d4b7c7c6aaf337f7518ef3c83f6 /usr.bin/tmux/cmd-run-shell.c | |
parent | Actively remove processes from the runqueues of a CPU when we stop it. (diff) | |
download | wireguard-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.c | 7 |
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) { |