apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <cliffwool...@yahoo.com>
Subject Re: cvs commit: apr/threadproc/win32 proc.c
Date Tue, 11 Sep 2001 00:50:25 GMT
On 11 Sep 2001 brane@apache.org wrote:

>   -        if (attr->child_in->filehand || attr->child_out->filehand
>   -                                     || attr->child_err->filehand) {
>   +        if (attr->child_in || attr->child_out || attr->child_err)
>   +        {
>                si.dwFlags |= STARTF_USESTDHANDLES;
>   -            si.hStdInput = attr->child_in->filehand;
>   -            si.hStdOutput = attr->child_out->filehand;
>   -            si.hStdError = attr->child_err->filehand;
>   +            if (attr->child_in)
>   +                si.hStdInput = attr->child_in->filehand;
>   +            if (attr->child_out)
>   +                si.hStdOutput = attr->child_out->filehand;
>   +            if (attr->child_err)
>   +                si.hStdError = attr->child_err->filehand;
>            }
>   +
>            rv = CreateProcessW(wprg, wcmd,        /* Command line */
>                                NULL, NULL,        /* Proc & thread security attributes
*/
>                                TRUE,              /* Inherit handles */
>   @@ -466,12 +477,15 @@
>                si.dwFlags |= STARTF_USESHOWWINDOW;
>                si.wShowWindow = SW_HIDE;
>            }
>   -        if (attr->child_in->filehand || attr->child_out->filehand
>   -                                     || attr->child_err->filehand) {
>   +        if (attr->child_in || attr->child_out || attr->child_err)
>   +        {
>                si.dwFlags |= STARTF_USESTDHANDLES;
>   -            si.hStdInput = attr->child_in->filehand;
>   -            si.hStdOutput = attr->child_out->filehand;
>   -            si.hStdError = attr->child_err->filehand;
>   +            if (attr->child_in)
>   +                si.hStdInput = attr->child_in->filehand;
>   +            if (attr->child_out)
>   +                si.hStdOutput = attr->child_out->filehand;
>   +            if (attr->child_err)
>   +                si.hStdError = attr->child_err->filehand;
>            }
>
>            rv = CreateProcessA(progname, cmdline, /* Command line */

So now si.dwFlags will be set to |= STARTF_USESTDHANDLES even if
all of the ->filehand's are zero.  Is that right?  Just checking.

--Cliff

--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA



Mime
View raw message