aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Riehs <tristan.riehs@bordeaux-inp.fr>2023-11-11 21:21:15 +0100
committerTristan Riehs <tristan.riehs@bordeaux-inp.fr>2023-11-11 21:21:15 +0100
commit180f7af84e671e0ed96d5ec85da379121f4749e5 (patch)
tree155a29d6949c664b6fb2e9e9f88994a91bf8e0d5
parent18e20fb1f61f2db450cdaaf998ebc68c4fe3d45d (diff)
exit_on_error closes the stdin clone
-rw-r--r--rpt.c4
1 files changed, 4 insertions, 0 deletions
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);
}