brane 01/09/10 18:03:07
Modified: threadproc/win32 proc.c
Log:
(apr_proc_create): Check the attribute pointers, yes, but *don't*
change the semantics while we're at it.
Revision Changes Path
1.51 +12 -8 apr/threadproc/win32/proc.c
Index: proc.c
===================================================================
RCS file: /home/cvs/apr/threadproc/win32/proc.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- proc.c 2001/09/11 00:38:50 1.50
+++ proc.c 2001/09/11 01:03:07 1.51
@@ -449,14 +449,16 @@
si.dwFlags |= STARTF_USESHOWWINDOW;
si.wShowWindow = SW_HIDE;
}
- 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))
{
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;
}
@@ -477,14 +479,16 @@
si.dwFlags |= STARTF_USESHOWWINDOW;
si.wShowWindow = SW_HIDE;
}
- 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))
{
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;
}