]> granicus.if.org Git - strace/commitdiff
close tcp->outf in droptcb()
authorWichert Akkerman <wichert@deephackmode.org>
Mon, 1 Apr 2002 17:48:02 +0000 (17:48 +0000)
committerWichert Akkerman <wichert@deephackmode.org>
Mon, 1 Apr 2002 17:48:02 +0000 (17:48 +0000)
ChangeLog
strace.c

index db8bdfe2b0f6f7cb503b197e756817a80ee5327c..64f5ef8199ee54d2683046610a70e6612e9dc5c8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2002-04-01  Wichert Akkerman <wichert@deephackmode.org>
+
+       * strace.c: close tcp->outf in droptcb()
+
 2002-04-01  Wichert Akkerman <wichert@deephackmode.org>
 
        * net.c: decode packet options
index fd6ac6d69ee3be2c0cb3177b82de15f4501610cc..aadd69d3cb93640107147f6ed890428b2c2d0268 100644 (file)
--- a/strace.c
+++ b/strace.c
@@ -953,6 +953,7 @@ struct tcb *tcp;
        nprocs--;
        tcp->pid = 0;
        tcp->flags = 0;
+
        if (tcp->pfd != -1) {
                close(tcp->pfd);
                tcp->pfd = -1;
@@ -974,10 +975,10 @@ struct tcb *tcp;
                tcp->parent->nchildren--;
                tcp->parent = NULL;
        }
-#if 0
-       if (tcp->outf != stderr)
+
+       if (outfname && tcp->outf)
                fclose(tcp->outf);
-#endif
+
        tcp->outf = 0;
 }