From: Wichert Akkerman Date: Wed, 3 Apr 2002 10:55:14 +0000 (+0000) Subject: Fix closing of outputfiles in droptcb() X-Git-Tag: v4.5.18~987 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=822f0c9a84a4c992cc126766c83726e7275a5572;p=strace Fix closing of outputfiles in droptcb() --- diff --git a/strace.c b/strace.c index aadd69d3..f88525db 100644 --- 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;