From 180f7af84e671e0ed96d5ec85da379121f4749e5 Mon Sep 17 00:00:00 2001 From: Tristan Riehs Date: Sat, 11 Nov 2023 21:21:15 +0100 Subject: exit_on_error closes the stdin clone --- rpt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rpt.c b/rpt.c index 780257d..d953e6f 100644 --- a/rpt.c +++ b/rpt.c @@ -54,6 +54,10 @@ exit_on_error(int status) fprintf(stderr, "rpt: child process exited with status %d, aborting\n", status); + + if (stdin_clone) + fclose(stdin_clone); + exit(status); } -- cgit v1.2.3