diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-08-04 21:06:02 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-08-04 21:06:02 +0200 |
commit | 2005d3ff3661220f11e8ff1911b24051b3669566 (patch) | |
tree | 478523a61f54385de175844a1f52a34a8a111da7 | |
parent | 037759bb4f57b0cb9b0daf6ffed43f90b62b8cb4 (diff) | |
download | busybox-w32-2005d3ff3661220f11e8ff1911b24051b3669566.tar.gz busybox-w32-2005d3ff3661220f11e8ff1911b24051b3669566.tar.bz2 busybox-w32-2005d3ff3661220f11e8ff1911b24051b3669566.zip |
tar: fix a thinko in prev commit - we need to copy to _unused_ fd
function old new delta
vfork_compressor 257 246 -11
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | archival/tar.c | 3 |
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) | |||
632 | * Swapping move_fd's order wouldn't work: | 632 | * Swapping move_fd's order wouldn't work: |
633 | * data.rd is 1 and _it_ would be destroyed. | 633 | * data.rd is 1 and _it_ would be destroyed. |
634 | */ | 634 | */ |
635 | xmove_fd(tfd, 3); | 635 | tfd = dup(tfd); |
636 | tfd = 3; | ||
637 | } | 636 | } |
638 | xmove_fd(data.rd, 0); | 637 | xmove_fd(data.rd, 0); |
639 | xmove_fd(tfd, 1); | 638 | xmove_fd(tfd, 1); |