Don't die if the client has been detached when the job finishes, just

don't display the output.
pull/1/head
Nicholas Marriott 2010-05-25 20:05:25 +00:00
parent 608eef731a
commit 1e8faaa217
1 changed files with 5 additions and 0 deletions

View File

@ -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) {