summaryrefslogtreecommitdiffstats
path: root/cmd-run-shell.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2010-05-25 20:05:25 +0000
committerNicholas Marriott <nicm@openbsd.org>2010-05-25 20:05:25 +0000
commit1e8faaa217e205d68fb0096f42303c2f3c7bcc0c (patch)
tree2dde5732807d418c504f5fb24bb45661f3e7131c /cmd-run-shell.c
parent608eef731a1e6973cff6e109aea31fabfdd8baaf (diff)
Don't die if the client has been detached when the job finishes, just
don't display the output.
Diffstat (limited to 'cmd-run-shell.c')
-rw-r--r--cmd-run-shell.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd-run-shell.c b/cmd-run-shell.c
index f5e834f1..3b6844eb 100644
--- a/cmd-run-shell.c
+++ b/cmd-run-shell.c
@@ -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) {