BUG: Can't close stdin.
This commit is contained in:
parent
e99e9baca4
commit
878b5792b9
@ -331,8 +331,10 @@ void kwsysProcess_Execute(kwsysProcess* cp)
|
|||||||
/* If this is the child process, run the real process. */
|
/* If this is the child process, run the real process. */
|
||||||
if(cp->ForkPID == 0)
|
if(cp->ForkPID == 0)
|
||||||
{
|
{
|
||||||
/* Close stdin. */
|
/* We used to close stdin, but some programs do not like being run
|
||||||
close(0);
|
without stdin. Just use whatever stdin the parent program is
|
||||||
|
using. */
|
||||||
|
/*close(0);*/
|
||||||
|
|
||||||
/* Setup the stdout/stderr pipes. */
|
/* Setup the stdout/stderr pipes. */
|
||||||
dup2(cp->PipeWriteEnds[KWSYSPE_PIPE_STDOUT], 1);
|
dup2(cp->PipeWriteEnds[KWSYSPE_PIPE_STDOUT], 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user