From d6a70ac44c5980123bd5e8e2b3329299d098de82 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 20 Feb 2004 03:57:36 +0000 Subject: * io.c (pipe_open): fix typo. * win32/win32.c (CreateChild): first argument to CreateProcess() must have path, not just basename. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- win32/win32.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'win32') diff --git a/win32/win32.c b/win32/win32.c index 99907cc682..54164322f3 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -12,6 +12,7 @@ #include "ruby.h" #include "rubysig.h" +#include "dln.h" #include #include #include @@ -901,7 +902,18 @@ CreateChild(const char *cmd, const char *prog, SECURITY_ATTRIBUTES *psa, HANDLE dwCreationFlags = (NORMAL_PRIORITY_CLASS); if (prog) { - shell = prog; + char *p = dln_find_exe(prog, NULL); + if (!p) { + shell = prog; + } + else { + shell = p; + while (*p) { + if ((unsigned char)*p == '/') + *p = '\\'; + p = CharNext(p); + } + } } else { int redir = -1; -- cgit v1.2.3