From: Alvaro Herrera Date: Tue, 21 Jun 2022 19:55:12 +0200 Subject: [PATCH v7 2/6] Allow tracefile to be stdout --- src/test/modules/libpq_pipeline/libpq_pipeline.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/test/modules/libpq_pipeline/libpq_pipeline.c b/src/test/modules/libpq_pipeline/libpq_pipeline.c index c27c4e0ada..8f6f2d4b4b 100644 --- a/src/test/modules/libpq_pipeline/libpq_pipeline.c +++ b/src/test/modules/libpq_pipeline/libpq_pipeline.c @@ -1630,7 +1630,10 @@ main(int argc, char **argv) /* Set the trace file, if requested */ if (tracefile != NULL) { - trace = fopen(tracefile, "w"); + if (strcmp(tracefile, "-") == 0) + trace = stdout; + else + trace = fopen(tracefile, "w"); if (trace == NULL) pg_fatal("could not open file \"%s\": %m", tracefile); -- 2.30.2 --c6botfw447u3lelj Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v7-0003-if-the-queue-becomes-empty-reset-the-tail-too.patch"