tar: handle the case when opened created tarball happens to have fd#0
authorDenys Vlasenko <vda.linux@googlemail.com>
Sat, 4 Aug 2018 16:15:19 +0000 (18:15 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sat, 4 Aug 2018 16:15:19 +0000 (18:15 +0200)
commit037759bb4f57b0cb9b0daf6ffed43f90b62b8cb4
tree64a7f3b7d8ca50d3e622c9f1a1bb2b91198723d9
parent45d68c3749d29339494eb38bb4d5fe3ea189ac77
tar: handle the case when opened created tarball happens to have fd#0

Reproducer:
    exec 0>&-
    exec 1>&-
    tar czf z.tar.gz FILE

function                                             old     new   delta
vfork_compressor                                     229     257     +28

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
archival/tar.c