Commit ed7f53e0 authored by Brad King's avatar Brad King

BUG: When handing the child stdin pipe a file, allow another process to be...

BUG: When handing the child stdin pipe a file, allow another process to be writing to the file at the same time.  This allows children such as tail -f to function properly.
parent ff359fd2
...@@ -1593,8 +1593,9 @@ int kwsysProcessCreate(kwsysProcess* cp, int index, ...@@ -1593,8 +1593,9 @@ int kwsysProcessCreate(kwsysProcess* cp, int index,
else if(cp->PipeFileSTDIN) else if(cp->PipeFileSTDIN)
{ {
/* Create a handle to read a file for stdin. */ /* Create a handle to read a file for stdin. */
HANDLE fin = CreateFile(cp->PipeFileSTDIN, GENERIC_READ, HANDLE fin = CreateFile(cp->PipeFileSTDIN, GENERIC_READ|GENERIC_WRITE,
FILE_SHARE_READ, 0, OPEN_EXISTING, 0, 0); FILE_SHARE_READ|FILE_SHARE_WRITE,
0, OPEN_EXISTING, 0, 0);
if(fin == INVALID_HANDLE_VALUE) if(fin == INVALID_HANDLE_VALUE)
{ {
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment