• Julius Plenz's avatar
    handle stdout correctly if it's a file · fd9969ec
    Julius Plenz authored
    When you invoke "tar cfv <tarball> <files>", then tar will close all
    active file descriptors it has, forks, then opens the target tarball
    as fd 1 (stdout). Then, it'll exec "gzip -", which *inherits* a stdout
    which is a file.
    
    Now we duplicate this stdout if it's a regular file so that we can
    advise it later. (The original will be closed via the _exit() routine,
    probably, which uses direct syscall that we cannot intercept.)
    fd9969ec
Name
Last commit
Last update
COPYING Loading commit data...
Makefile Loading commit data...
README Loading commit data...
README.md Loading commit data...
cachedel.c Loading commit data...
cachestats.c Loading commit data...
fcntl_helpers.c Loading commit data...
nocache Loading commit data...
nocache.c Loading commit data...
nocache.global Loading commit data...