summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-20 03:57:36 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-20 03:57:36 +0000
commit258af4f8c096d434735d4e8907cc2aaa8f6124fc (patch)
tree5bf2037ba83b9934f9a8d33ffe89c516c7b57d6c
parenta66b647f0cf23b3f331e0671631dd7d12da9807d (diff)
downloadruby-258af4f8c096d434735d4e8907cc2aaa8f6124fc.tar.gz
ruby-258af4f8c096d434735d4e8907cc2aaa8f6124fc.tar.xz
ruby-258af4f8c096d434735d4e8907cc2aaa8f6124fc.zip
* io.c (pipe_open): fix typo.
* win32/win32.c (CreateChild): first argument to CreateProcess() must have path, not just basename. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--io.c2
-rw-r--r--win32/win32.c14
2 files changed, 14 insertions, 2 deletions
diff --git a/io.c b/io.c
index 8e1a58bef..3568228a8 100644
--- a/io.c
+++ b/io.c
@@ -2682,7 +2682,7 @@ pipe_open(argc, argv, pname, mode)
#endif
rb_thread_sleep(1);
break;
- defined:
+ default:
rb_sys_fail(pname);
break;
}
diff --git a/win32/win32.c b/win32/win32.c
index 99907cc68..54164322f 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -12,6 +12,7 @@
#include "ruby.h"
#include "rubysig.h"
+#include "dln.h"
#include <fcntl.h>
#include <process.h>
#include <sys/stat.h>
@@ -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;