From 1e8faaa217e205d68fb0096f42303c2f3c7bcc0c Mon Sep 17 00:00:00 2001 From: Nicholas Marriott 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. --- cmd-run-shell.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cmd-run-shell.c') 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) { -- cgit v1.2.3