From ec6de1ebefe65f9a4be0edafeda3d6caeea1442d Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 9 Mar 2022 08:46:50 -0500 Subject: ctx: Don't include std{out,err} in the open file count --- ctx.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ctx.c b/ctx.c index 7f4fa03..236094c 100644 --- a/ctx.c +++ b/ctx.c @@ -189,7 +189,11 @@ CFILE *bfs_ctx_dedup(struct bfs_ctx *ctx, CFILE *cfile, const char *path) { ctx_file->cfile = cfile; ctx_file->path = path; - ++ctx->nfiles; + + if (cfile != ctx->cout && cfile != ctx->cerr) { + ++ctx->nfiles; + } + return cfile; } -- cgit v1.2.3