summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-14 04:19:28 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-14 04:19:28 +0000
commit2717a2eb6e49c08c98ed74679ecb3e5c2e56060e (patch)
tree87a2336337b2b0b5d1fcd0a75b7f666fc010a4cb
parentf188bf2acb3aef0a6525500a84bf38b1fa6d2a3f (diff)
* win32/win32.c (rb_w32_aspawn): should not escape with carret
unless using cmd.exe. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--win32/win32.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 3975b4dc2a..8bbdea07c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Jan 14 13:19:21 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * win32/win32.c (rb_w32_aspawn): should not escape with carret
+ unless using cmd.exe.
+
Wed Jan 14 13:09:00 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/socket/extconf.rb (gai_strerror): checks if available and if
diff --git a/win32/win32.c b/win32/win32.c
index 8ed026df8c..b948fe0d77 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -1011,7 +1011,7 @@ rb_pid_t
rb_w32_aspawn(int mode, const char *prog, char *const *argv)
{
int len, differ = 0, c_switch = 0;
- BOOL ntcmd = FALSE;
+ BOOL ntcmd = FALSE, tmpnt;
const char *shell;
char *cmd, fbuf[MAXPATHLEN];
@@ -1019,7 +1019,8 @@ rb_w32_aspawn(int mode, const char *prog, char *const *argv)
if (!prog) prog = argv[0];
if ((shell = getenv("COMSPEC")) &&
- internal_cmd_match(prog, ntcmd = !is_command_com(shell))) {
+ internal_cmd_match(prog, tmpnt = !is_command_com(shell))) {
+ ntcmd = tmpnt;
prog = shell;
c_switch = 1;
differ = 1;