From 034cc75fe36c8aa03d809b68f276672fb072b54e Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 25 May 2010 20:05:25 +0000 Subject: Don't die if the client has been detached when the job finishes, just don't display the output. --- usr.bin/tmux/cmd-run-shell.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'usr.bin/tmux/cmd-run-shell.c') 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 @@ -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) { -- cgit v1.2.3-59-g8ed1b