* fork.cc (frok::parent): Call CreateProcessW with command line set

to the parent command line.  Change comment to explain why.
This commit is contained in:
Corinna Vinschen 2013-05-23 20:47:45 +00:00
parent c6696a3426
commit 61fb9713c6
3 changed files with 18 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2013-05-23 Corinna Vinschen <corinna@vinschen.de>
* fork.cc (frok::parent): Call CreateProcessW with command line set
to the parent command line. Change comment to explain why.
2013-05-23 Corinna Vinschen <corinna@vinschen.de>
* dcrt0.cc (child_info_fork::alloc_stack_hard_way): Fix datatype of

View File

@ -351,7 +351,11 @@ frok::parent (volatile char * volatile stack_here)
{
hchild = NULL;
rc = CreateProcessW (myself->progname, /* image to run */
myself->progname, /* what we send in arg0 */
GetCommandLineW (), /* Take same space for command
line as in parent to make
sure child stack is allocated
in the same memory location
as in parent. */
&sec_none_nih,
&sec_none_nih,
TRUE, /* inherit handles from parent */

View File

@ -15,4 +15,11 @@ What's new:
Bug fixes:
----------
- getgrouplist
- getgrouplist now always creates a group list, even if it's empty.
Fixes: http://cygwin.com/ml/cygwin/2013-05/msg00157.html
- In fork, call CreateProcessW with the same command line as the parent
process. This seems to make sure the stack is created in the same
memory location as in the parent.
Fixes: http://cygwin.com/ml/cygwin/2013-05/msg00340.html