diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 89490e036..480dd7972 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2013-05-23 Corinna Vinschen + + * 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 * dcrt0.cc (child_info_fork::alloc_stack_hard_way): Fix datatype of diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc index 7d5f7101c..837fc1f81 100644 --- a/winsup/cygwin/fork.cc +++ b/winsup/cygwin/fork.cc @@ -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 */ diff --git a/winsup/cygwin/release/1.7.19 b/winsup/cygwin/release/1.7.19 index 0b495cee4..112210ac1 100644 --- a/winsup/cygwin/release/1.7.19 +++ b/winsup/cygwin/release/1.7.19 @@ -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 +