From 41b5fee26c9b8b8c9ffd3a3aa47cf61a6fcca7db Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Sat, 14 May 2011 10:20:20 +0800 Subject: close pipe fd before returning --- src/cli_new.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cli_new.c b/src/cli_new.c index 2cb0c03..f01d2a4 100644 --- a/src/cli_new.c +++ b/src/cli_new.c @@ -2290,6 +2290,7 @@ system_out(char *cmd, const char *prepend_msg, boolean eloc) if (!prepend) { fprintf(out_stream, "\n"); } + close(pfd[0]); if (!waited) { if (waitpid(cpid, &status, 0) != cpid) { return -1; -- cgit v1.2.3