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>
This commit is contained in:
parent
037759bb4f
commit
2005d3ff36
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user