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:
if (hdr.len == 0)
close(local_stdin_fd);
else
write_all(local_stdin_fd, buf, hdr.len);
else if (!write_all(local_stdin_fd, buf, hdr.len)) {
perror("write local stdout");
exit(1);
}
break;
case MSG_SERVER_TO_CLIENT_STDERR:
write_all(2, buf, hdr.len);