From 41815e3d0fb696c73d09ed1d618de220e747ea4d Mon Sep 17 00:00:00 2001 From: Jeremy Maitin-Shepard Date: Thu, 31 Jul 2008 15:41:32 -0700 Subject: [PATCH] spawn-process-helper: close stdin so that spawned process does not inherit it --- spawn-process-helper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spawn-process-helper.c b/spawn-process-helper.c index 3663691..2c7c381 100644 --- a/spawn-process-helper.c +++ b/spawn-process-helper.c @@ -224,6 +224,9 @@ int main(int argc, char **argv) { /* Block SIGPIPE to avoid a signal being generated while writing to a socket */ signal(SIGPIPE, SIG_IGN); + /* Close STDIN as we don't need it */ + close(STDIN_FILENO); + /* Parse key file */ { char *buf; -- 2.11.4.GIT