1
0
mirror of https://github.com/tmate-io/tmate-ssh-server.git synced 2020-11-18 19:53:51 -08:00

Sync OpenBSD patchset 705:

Don't die if the client has been detached when the job finishes, just
don't display the output.
This commit is contained in:
Tiago Cunha 2010-06-06 00:04:59 +00:00
parent 0d6a64070c
commit 348c3e69de

View File

@ -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> * Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org>
@ -82,6 +82,11 @@ cmd_run_shell_callback(struct job *job)
int retcode; int retcode;
u_int lines; 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; lines = 0;
do { do {
if ((line = evbuffer_readline(job->event->input)) != NULL) { if ((line = evbuffer_readline(job->event->input)) != NULL) {