]> granicus.if.org Git - strace/commitdiff
Fix closing of outputfiles in droptcb()
authorWichert Akkerman <wichert@deephackmode.org>
Wed, 3 Apr 2002 10:55:14 +0000 (10:55 +0000)
committerWichert Akkerman <wichert@deephackmode.org>
Wed, 3 Apr 2002 10:55:14 +0000 (10:55 +0000)
strace.c

index aadd69d3cb93640107147f6ed890428b2c2d0268..f88525db7d94d083be6b150d54368bcd6bf56a18 100644 (file)
--- a/strace.c
+++ b/strace.c
@@ -976,7 +976,7 @@ struct tcb *tcp;
                tcp->parent = NULL;
        }
 
-       if (outfname && tcp->outf)
+       if (outfname && followfork > 1 && tcp->outf)
                fclose(tcp->outf);
 
        tcp->outf = 0;