diff options
Diffstat (limited to 'winsup/cygwin/fork.cc')
-rw-r--r-- | winsup/cygwin/fork.cc | 6 |
1 files changed, 5 insertions, 1 deletions
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 */ |