← Commit list

2005d3ff3

Denys Vlasenko
Denys Vlasenko
2018-08-04
SUCCESS Duration: 147s

Subject

tar: fix a thinko in prev commit - we need to copy to _unused_ fd

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

archival/tar.c+1 -2
@@ -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);