Rev 150 | Rev 175 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 150 | Rev 174 | ||
---|---|---|---|
Line 68... | Line 68... | ||
68 | SetHandleInformation (hStdIO[ME_TO_IT][WR], HANDLE_FLAG_INHERIT, 0); // ensure the write handle to the pipe for STDIN is not inherited |
68 | SetHandleInformation (hStdIO[ME_TO_IT][WR], HANDLE_FLAG_INHERIT, 0); // ensure the write handle to the pipe for STDIN is not inherited |
69 | SetHandleInformation (hStdIO[IT_TO_ME][RD], HANDLE_FLAG_INHERIT, 0); // ensure the read handle to the pipe for STDOUT is not inherited |
69 | SetHandleInformation (hStdIO[IT_TO_ME][RD], HANDLE_FLAG_INHERIT, 0); // ensure the read handle to the pipe for STDOUT is not inherited |
70 | pipe->descriptors[RD] = _open_osfhandle ((intptr_t) hStdIO[IT_TO_ME][RD], _O_BINARY); |
70 | pipe->descriptors[RD] = _open_osfhandle ((intptr_t) hStdIO[IT_TO_ME][RD], _O_BINARY); |
71 | pipe->descriptors[WR] = _open_osfhandle ((intptr_t) hStdIO[ME_TO_IT][WR], _O_BINARY | _O_APPEND); |
71 | pipe->descriptors[WR] = _open_osfhandle ((intptr_t) hStdIO[ME_TO_IT][WR], _O_BINARY | _O_APPEND); |
72 | 72 | ||
73 | // spawn the |
73 | // spawn the child process with redirected input and output |
74 | memset (&startup_info, 0, sizeof (startup_info)); |
74 | memset (&startup_info, 0, sizeof (startup_info)); |
75 | startup_info.cb = sizeof (STARTUPINFOA); |
75 | startup_info.cb = sizeof (STARTUPINFOA); |
76 | startup_info.dwFlags = STARTF_USESTDHANDLES; |
76 | startup_info.dwFlags = STARTF_USESTDHANDLES; |
77 | startup_info.hStdInput = hStdIO[ME_TO_IT][RD]; |
77 | startup_info.hStdInput = hStdIO[ME_TO_IT][RD]; |
78 | startup_info.hStdOutput = hStdIO[IT_TO_ME][WR]; |
78 | startup_info.hStdOutput = hStdIO[IT_TO_ME][WR]; |