Update of /cvsroot/opengtoolkit/pipe/c_source
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31349/c_source
Modified Files:
pipes.c
Log Message:
Commit non-debug DLL for testing without breapoints
Index: pipes.c
===================================================================
RCS file: /cvsroot/opengtoolkit/pipe/c_source/pipes.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** pipes.c 5 Jun 2005 21:11:39 -0000 1.9
--- pipes.c 7 Jun 2005 16:29:25 -0000 1.10
***************
*** 50,54 ****
#if defined(MSWin)
! static MgErr CreateChildProcess(LPSTR cmdline, DWORD *pid);
static MgErr Win32ToLVErr(DWORD error);
#elif defined (Unix)
--- 50,54 ----
#if defined(MSWin)
! static MgErr CreateChildProcess(LPSTR cmdline, HANDLE stdIn, HANDLE stdOut, HANDLE stdErr, DWORD *pid);
static MgErr Win32ToLVErr(DWORD error);
#elif defined (Unix)
***************
*** 239,243 ****
goto error;
! /* Duplicate the write handle to the pipe so it is not inherited. */
if (!DuplicateHandle(GetCurrentProcess(), hChildStderrRd,
GetCurrentProcess(), (HANDLE*)fdErr, 0,
--- 239,243 ----
goto error;
! /* Duplicate the read handle to the pipe so it is not inherited. */
if (!DuplicateHandle(GetCurrentProcess(), hChildStderrRd,
GetCurrentProcess(), (HANDLE*)fdErr, 0,
***************
*** 250,254 ****
/* Now create the child process. */
! err = CreateChildProcess(cmd, processID);
if (err)
goto error;
--- 250,254 ----
/* Now create the child process. */
! err = CreateChildProcess(cmd, hChildStdinRd, hChildStdoutWr, hChildStderrWr, processID);
if (err)
goto error;
***************
*** 480,484 ****
#if defined(MSWin)
! static MgErr CreateChildProcess(LPSTR cmdline, DWORD *pid)
{
PROCESS_INFORMATION piProcInfo;
--- 480,484 ----
#if defined(MSWin)
! static MgErr CreateChildProcess(LPSTR cmdline, HANDLE stdIn, HANDLE stdOut, HANDLE stdErr, DWORD *pid)
{
PROCESS_INFORMATION piProcInfo;
***************
*** 492,495 ****
--- 492,500 ----
ZeroMemory( &siStartInfo, sizeof(STARTUPINFO) );
siStartInfo.cb = sizeof(STARTUPINFO);
+ siStartInfo.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
+ siStartInfo.wShowWindow = SW_HIDE;
+ siStartInfo.hStdInput = stdIn;
+ siStartInfo.hStdOutput = stdOut;
+ siStartInfo.hStdError = stdErr;
/* Create the child process. */
|