From dc2969a5f8f438b2722dccff0be98b34556f9b13 Mon Sep 17 00:00:00 2001 From: randomuser Date: Fri, 7 Jan 2022 02:36:48 -0600 Subject: [PATCH] add more file closing to negate pipe(...) error --- c/simplestatus.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/c/simplestatus.c b/c/simplestatus.c index 896db22..7e00d02 100644 --- a/c/simplestatus.c +++ b/c/simplestatus.c @@ -128,6 +128,7 @@ char *execstdout(char *file, char *arg[], char *env[]) { return buf; } close(pfds[0]); + close(pfds[1]); } } @@ -239,6 +240,8 @@ module *parse_file(char *file) { } } + fclose(fp); + return head; }