mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
fc421cf6ac
commit
d6a70ac44c
2 changed files with 14 additions and 2 deletions
2
io.c
2
io.c
|
|
@ -2682,7 +2682,7 @@ pipe_open(argc, argv, pname, mode)
|
||||||
#endif
|
#endif
|
||||||
rb_thread_sleep(1);
|
rb_thread_sleep(1);
|
||||||
break;
|
break;
|
||||||
defined:
|
default:
|
||||||
rb_sys_fail(pname);
|
rb_sys_fail(pname);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@
|
||||||
|
|
||||||
#include "ruby.h"
|
#include "ruby.h"
|
||||||
#include "rubysig.h"
|
#include "rubysig.h"
|
||||||
|
#include "dln.h"
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <process.h>
|
#include <process.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
@ -901,7 +902,18 @@ CreateChild(const char *cmd, const char *prog, SECURITY_ATTRIBUTES *psa, HANDLE
|
||||||
dwCreationFlags = (NORMAL_PRIORITY_CLASS);
|
dwCreationFlags = (NORMAL_PRIORITY_CLASS);
|
||||||
|
|
||||||
if (prog) {
|
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 {
|
else {
|
||||||
int redir = -1;
|
int redir = -1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue