From 1288a135204494ea026c8ccd458cbf5982f5f2dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 23 Jun 2015 02:44:59 +0200 Subject: [PATCH] qrexec: do not terminate before sending all the data Make sure that all the data from local process is sent (including final EOF), before handling its exit code - which would include terminating qrexec-client process. --- qrexec/qrexec-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qrexec/qrexec-client.c b/qrexec/qrexec-client.c index d909e39..cfa7bd3 100644 --- a/qrexec/qrexec-client.c +++ b/qrexec/qrexec-client.c @@ -431,7 +431,7 @@ static void select_loop(libvchan_t *vchan) if (local_stdout_fd > max_fd) max_fd = local_stdout_fd; } - if (child_exited) + if (child_exited && local_stdout_fd == -1) check_child_status(vchan); if (libvchan_data_ready(vchan) > 0) { /* check for other FDs, but exit immediately */