On 11 Sep 2001 [EMAIL PROTECTED] 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
[EMAIL PROTECTED]
Charlottesville, VA