mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* win32/win32.c (CreateChild): force to inherit standard I/O handles.
this change fixes [ruby-core:27273], but other side effects might exist. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
26269cbd5d
commit
3fb4d27a8d
2 changed files with 24 additions and 20 deletions
|
@ -1,3 +1,9 @@
|
|||
Mon Dec 28 22:33:58 2009 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* win32/win32.c (CreateChild): force to inherit standard I/O handles.
|
||||
this change fixes [ruby-core:27273], but other side effects might
|
||||
exist.
|
||||
|
||||
Mon Dec 28 22:00:10 2009 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
|
||||
|
||||
* test/ruby/test_marshal.rb: added tests for taintness/untrustness
|
||||
|
|
|
@ -956,26 +956,24 @@ CreateChild(const char *cmd, const char *prog, SECURITY_ATTRIBUTES *psa,
|
|||
memset(&aStartupInfo, 0, sizeof (STARTUPINFO));
|
||||
memset(&aProcessInformation, 0, sizeof (PROCESS_INFORMATION));
|
||||
aStartupInfo.cb = sizeof (STARTUPINFO);
|
||||
if (hInput || hOutput || hError) {
|
||||
aStartupInfo.dwFlags = STARTF_USESTDHANDLES;
|
||||
if (hInput) {
|
||||
aStartupInfo.hStdInput = hInput;
|
||||
}
|
||||
else {
|
||||
aStartupInfo.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
|
||||
}
|
||||
if (hOutput) {
|
||||
aStartupInfo.hStdOutput = hOutput;
|
||||
}
|
||||
else {
|
||||
aStartupInfo.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
}
|
||||
if (hError) {
|
||||
aStartupInfo.hStdError = hError;
|
||||
}
|
||||
else {
|
||||
aStartupInfo.hStdError = GetStdHandle(STD_ERROR_HANDLE);
|
||||
}
|
||||
aStartupInfo.dwFlags = STARTF_USESTDHANDLES;
|
||||
if (hInput) {
|
||||
aStartupInfo.hStdInput = hInput;
|
||||
}
|
||||
else {
|
||||
aStartupInfo.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
|
||||
}
|
||||
if (hOutput) {
|
||||
aStartupInfo.hStdOutput = hOutput;
|
||||
}
|
||||
else {
|
||||
aStartupInfo.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
}
|
||||
if (hError) {
|
||||
aStartupInfo.hStdError = hError;
|
||||
}
|
||||
else {
|
||||
aStartupInfo.hStdError = GetStdHandle(STD_ERROR_HANDLE);
|
||||
}
|
||||
|
||||
dwCreationFlags = (NORMAL_PRIORITY_CLASS);
|
||||
|
|
Loading…
Reference in a new issue