diff options
author | Tiago Cunha <tcunha@gmx.com> | 2010-06-06 00:04:59 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2010-06-06 00:04:59 +0000 |
commit | 348c3e69de7e8ce7573d349851ace3e20f4333af (patch) | |
tree | 93bacf1f27d331855e955e88dbe9b041168a560a | |
parent | 0d6a64070c79686dd7d9386e5abec8bcc0c91e18 (diff) | |
download | rtmux-348c3e69de7e8ce7573d349851ace3e20f4333af.tar.gz rtmux-348c3e69de7e8ce7573d349851ace3e20f4333af.tar.bz2 rtmux-348c3e69de7e8ce7573d349851ace3e20f4333af.zip |
Sync OpenBSD patchset 705:
Don't die if the client has been detached when the job finishes, just
don't display the output.
-rw-r--r-- | cmd-run-shell.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cmd-run-shell.c b/cmd-run-shell.c index cc2ec0c3..0a4a4095 100644 --- a/cmd-run-shell.c +++ b/cmd-run-shell.c @@ -1,4 +1,4 @@ -/* $Id: cmd-run-shell.c,v 1.6 2009-11-14 17:56:39 tcunha Exp $ */ +/* $Id: cmd-run-shell.c,v 1.7 2010-06-06 00:04:59 tcunha 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) { |