summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2003-08-05 17:53:30 (GMT)
committerBrad King <brad.king@kitware.com>2003-08-05 17:53:30 (GMT)
commit878b5792b9966c91a5bc9dd9e032ff043c9cc505 (patch)
treee96086fe848b076d30147afe32863fbf62c6ad16 /Source
parente99e9baca48dd87b2820ce46e0de241542a56796 (diff)
downloadCMake-878b5792b9966c91a5bc9dd9e032ff043c9cc505.zip
CMake-878b5792b9966c91a5bc9dd9e032ff043c9cc505.tar.gz
CMake-878b5792b9966c91a5bc9dd9e032ff043c9cc505.tar.bz2
BUG: Can't close stdin.
Diffstat (limited to 'Source')
-rw-r--r--Source/kwsys/ProcessUNIX.c6
1 files 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);