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 01:14:06 GMT
On 11 Sep 2001 brane@apache.org wrote:

>   -        if (attr->child_in || attr->child_out || attr->child_err)
>   +        if ((attr->child_in && attr->child_in->filehand)
>   +            || (attr->child_out && attr->child_out->filehand)
>   +            || (attr->child_err && attr->child_err->filehand))

Yep.

>            {
>                si.dwFlags |= STARTF_USESTDHANDLES;
>   -            if (attr->child_in)
>   +            if (attr->child_in && attr->child_in->filehand)
>                    si.hStdInput = attr->child_in->filehand;
>   -            if (attr->child_out)
>   +            if (attr->child_out && attr->child_out->filehand)
>                    si.hStdOutput = attr->child_out->filehand;
>   -            if (attr->child_err)
>   +            if (attr->child_err && attr->child_err->filehand)
>                    si.hStdError = attr->child_err->filehand;

This shouldn't be required.  The original version set all three
si.hStdfoo's unconditionally.  Just checking attr->child_foo to avoid a
segfault is sufficient.

Thanks,
--Cliff

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



Mime
View raw message