aboutsummaryrefslogtreecommitdiff
path: root/archival/tar.c
diff options
context:
space:
mode:
Diffstat (limited to 'archival/tar.c')
-rw-r--r--archival/tar.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/archival/tar.c b/archival/tar.c
index 120c77f3b..1c71f7f66 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -632,8 +632,7 @@ static void NOINLINE vfork_compressor(int tar_fd, const char *gzip)
* Swapping move_fd's order wouldn't work:
* data.rd is 1 and _it_ would be destroyed.
*/
- xmove_fd(tfd, 3);
- tfd = 3;
+ tfd = dup(tfd);
}
xmove_fd(data.rd, 0);
xmove_fd(tfd, 1);