aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/lang/natWin32Process.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/lang/natWin32Process.cc')
-rw-r--r--libjava/java/lang/natWin32Process.cc18
1 files changed, 12 insertions, 6 deletions
diff --git a/libjava/java/lang/natWin32Process.cc b/libjava/java/lang/natWin32Process.cc
index 7337ab3..3c1a4f0 100644
--- a/libjava/java/lang/natWin32Process.cc
+++ b/libjava/java/lang/natWin32Process.cc
@@ -25,6 +25,9 @@ details. */
#include <java/io/FileOutputStream.h>
#include <java/io/IOException.h>
#include <java/lang/OutOfMemoryError.h>
+#include <gnu/java/nio/channels/FileChannelImpl.h>
+
+using gnu::java::nio::channels::FileChannelImpl;
void
java::lang::ConcreteProcess::cleanup (void)
@@ -282,12 +285,15 @@ java::lang::ConcreteProcess::startProcess (jstringArray progarray,
ChildProcessPipe aChildStdOut(ChildProcessPipe::OUTPUT);
ChildProcessPipe aChildStdErr(ChildProcessPipe::OUTPUT);
- outputStream = new FileOutputStream (new FileDescriptor (
- (jint) aChildStdIn.getParentHandle ()));
- inputStream = new FileInputStream (new FileDescriptor (
- (jint) aChildStdOut.getParentHandle ()));
- errorStream = new FileInputStream (new FileDescriptor (
- (jint) aChildStdErr.getParentHandle ()));
+ outputStream = new FileOutputStream (new FileChannelImpl (
+ (jint) aChildStdIn.getParentHandle (),
+ FileChannelImpl::WRITE));
+ inputStream = new FileInputStream (new FileChannelImpl (
+ (jint) aChildStdOut.getParentHandle (),
+ FileChannelImpl::READ));
+ errorStream = new FileInputStream (new FileChannelImpl (
+ (jint) aChildStdErr.getParentHandle (),
+ FileChannelImpl::READ));
// Now create the child process.
PROCESS_INFORMATION pi;