> Here's an attempt to tighten compress/gzip's pledge: > > Due to the use of fts(3), we always require rpath, even for > gzip <in >out. > > We only write to stdio and never to any files... > * if we are in cat mode (-c, zcat) > * if we are in test mode (-t) > * if there are no file arguments and there is no -o outfile > > Does the logic sound correct? It could use more testing.
Seems sound. An even better plan would to recognize this stdin/out mode, and entirely bypass that fts_open code. Wow, that's quite the mess isn't it. I cannot figure out how to refactor it. So many variables..