In qrexec_client, check write_all(local_stdin_fd,..) value

This commit is contained in:
Rafal Wojtczuk 2011-03-11 13:16:33 +01:00
parent 1a5bfd8c2b
commit b9e0e93a90

View File

@ -125,8 +125,10 @@ void handle_daemon_data(int s)
case MSG_SERVER_TO_CLIENT_STDOUT: case MSG_SERVER_TO_CLIENT_STDOUT:
if (hdr.len == 0) if (hdr.len == 0)
close(local_stdin_fd); close(local_stdin_fd);
else else if (!write_all(local_stdin_fd, buf, hdr.len)) {
write_all(local_stdin_fd, buf, hdr.len); perror("write local stdout");
exit(1);
}
break; break;
case MSG_SERVER_TO_CLIENT_STDERR: case MSG_SERVER_TO_CLIENT_STDERR:
write_all(2, buf, hdr.len); write_all(2, buf, hdr.len);