Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2013-05-24 12:43:43 +0400
committerCorinna Vinschen <corinna@vinschen.de>2013-05-24 12:43:43 +0400
commit592989d65ce8cbaf8f0e4aa1e295e418da009f13 (patch)
treeba8192b9bc07ae8af5363c0d9dad38f73128b6e6
parent61fb9713c6ac3e1fb6878c0adffb1d6d39638efe (diff)
* fork.cc (frok::parent): Always set CREATE_UNICODE_ENVIRONMENT flag.
Explain why.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/fork.cc5
2 files changed, 10 insertions, 0 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 480dd7972..c69159de6 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2013-05-24 Corinna Vinschen <corinna@vinschen.de>
+
+ * fork.cc (frok::parent): Always set CREATE_UNICODE_ENVIRONMENT flag.
+ Explain why.
+
2013-05-23 Corinna Vinschen <corinna@vinschen.de>
* fork.cc (frok::parent): Call CreateProcessW with command line set
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc
index 837fc1f81..f7b9aa880 100644
--- a/winsup/cygwin/fork.cc
+++ b/winsup/cygwin/fork.cc
@@ -262,6 +262,11 @@ frok::parent (volatile char * volatile stack_here)
int c_flags = GetPriorityClass (GetCurrentProcess ());
debug_printf ("priority class %d", c_flags);
+ /* Per MSDN, this must be specified even if lpEnvironment is set to NULL,
+ otherwise UNICODE characters in the parent environment are not copied
+ correctly to the child. Omitting it may scramble %PATH% on non-English
+ systems. */
+ c_flags |= CREATE_UNICODE_ENVIRONMENT;
errmsg = NULL;
hchild = NULL;