diff options
author | Christopher Faylor <me@cgf.cx> | 2009-04-22 19:08:53 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2009-04-22 19:08:53 +0000 |
commit | 08825b6edc43d6eb5d6b06bb3d0af3192d1d13f2 (patch) | |
tree | 1bb4e279b5f6f26e54ae73b6acc05cefa3a5b442 /winsup | |
parent | 819e57447414b42c74fcf8cf48a227be7d6b09fa (diff) | |
download | cygnal-08825b6edc43d6eb5d6b06bb3d0af3192d1d13f2.tar.gz cygnal-08825b6edc43d6eb5d6b06bb3d0af3192d1d13f2.tar.bz2 cygnal-08825b6edc43d6eb5d6b06bb3d0af3192d1d13f2.zip |
* strace.cc (create_child): Set CYGWIN=noglob when starting new process so that
Cygwin will leave already-parsed the command line alonw.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/utils/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/utils/strace.cc | 12 |
2 files changed, 16 insertions, 1 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index 635cbdbb7..5b9de0469 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,3 +1,8 @@ +2009-04-22 Christopher Faylor <me+cygwin@cgf.cx> + + * strace.cc (create_child): Set CYGWIN=noglob when starting new process + so that Cygwin will leave already-parsed the command line alonw. + 2009-04-15 Corinna Vinschen <corinna@vinschen.de> * cygpath.cc (do_pathconv): Only skip \\?\ prefix if it's really diff --git a/winsup/utils/strace.cc b/winsup/utils/strace.cc index 745da9d2c..0334eb71e 100644 --- a/winsup/utils/strace.cc +++ b/winsup/utils/strace.cc @@ -326,12 +326,22 @@ create_child (char **argv) make_command_line (one_line, argv); SetConsoleCtrlHandler (NULL, 0); + const char *cygwin_env = getenv ("CYGWIN"); + const char *space; + if (cygwin_env) + space = " "; + else + space = cygwin_env = ""; + char *newenv = (char *) malloc (sizeof ("CYGWIN=noglob") + strlen (space) + strlen (cygwin_env)); + sprintf (newenv, "CYGWIN=noglob%s%s", space, cygwin_env); + _putenv (newenv); ret = CreateProcess (0, one_line.buf, /* command line */ NULL, /* Security */ NULL, /* thread */ TRUE, /* inherit handles */ flags, /* start flags */ - NULL, NULL, /* current directory */ + NULL, /* default environment */ + NULL, /* current directory */ &si, &pi); if (!ret) error (0, "error creating process %s, (error %d)", *argv, |