mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-21 01:59:07 +00:00
nc-vsock: shutdown output socket on input EOF
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
This commit is contained in:
parent
a9784a5fe0
commit
f9825fbafd
@ -219,7 +219,12 @@ static int xfer_data(int in_fd, int out_fd)
|
||||
return -1;
|
||||
}
|
||||
if (nbytes == 0) {
|
||||
return 0;
|
||||
int rc;
|
||||
if (out_fd == STDOUT_FILENO) return 0;
|
||||
rc = shutdown(out_fd, SHUT_WR);
|
||||
if (rc == 0) return 0;
|
||||
perror("shutdown");
|
||||
return -1;
|
||||
}
|
||||
|
||||
remaining = nbytes;
|
||||
|
Loading…
Reference in New Issue
Block a user