nc-vsock: output to stdout rather than stdin

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
This commit is contained in:
Ian Campbell 2016-03-29 16:54:22 +01:00
parent 3d7da9df67
commit 2e70f27c79

View File

@ -212,6 +212,8 @@ static int xfer_data(int in_fd, int out_fd)
ssize_t nbytes;
ssize_t remaining;
if (out_fd == STDIN_FILENO) out_fd = STDOUT_FILENO;
nbytes = read(in_fd, buf, sizeof(buf));
if (nbytes <= 0) {
return -1;