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.
This commit is contained in:
Marek Marczykowski-Górecki 2015-06-23 02:44:59 +02:00
parent 7ce62cbd98
commit 1288a13520

View File

@ -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 */