From 878b5792b9966c91a5bc9dd9e032ff043c9cc505 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 5 Aug 2003 13:53:30 -0400 Subject: BUG: Can't close stdin. --- Source/kwsys/ProcessUNIX.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/kwsys/ProcessUNIX.c b/Source/kwsys/ProcessUNIX.c index bf433f3..d0fa5eb 100644 --- a/Source/kwsys/ProcessUNIX.c +++ b/Source/kwsys/ProcessUNIX.c @@ -331,8 +331,10 @@ void kwsysProcess_Execute(kwsysProcess* cp) /* If this is the child process, run the real process. */ if(cp->ForkPID == 0) { - /* Close stdin. */ - close(0); + /* We used to close stdin, but some programs do not like being run + without stdin. Just use whatever stdin the parent program is + using. */ + /*close(0);*/ /* Setup the stdout/stderr pipes. */ dup2(cp->PipeWriteEnds[KWSYSPE_PIPE_STDOUT], 1); -- cgit v0.12