1 // Win32Process.java - Subclass of Process for Win32 systems.
3 /* Copyright (C) 2002, 2003 Free Software Foundation
5 This file is part of libgcj.
7 This software is copyrighted work licensed under the terms of the
8 Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
14 import java
.io
.InputStream
;
15 import java
.io
.OutputStream
;
16 import java
.io
.IOException
;
23 // This is entirely internal to our implementation.
25 // This file is copied to `ConcreteProcess.java' before compilation.
26 // Hence the class name apparently does not match the file name.
27 final class ConcreteProcess
extends Process
29 public native void destroy ();
31 public native boolean hasExited ();
33 public int exitValue ()
36 throw new IllegalThreadStateException ("Process has not exited");
41 public InputStream
getErrorStream ()
46 public InputStream
getInputStream ()
51 public OutputStream
getOutputStream ()
56 public native int waitFor () throws InterruptedException
;
58 public native void startProcess (String
[] progarray
,
63 public native void cleanup ();
65 public ConcreteProcess (String
[] progarray
,
70 startProcess (progarray
, envp
, dir
);
73 // The standard streams (stdin, stdout and stderr, respectively)
74 // of the child as seen by the parent process.
75 private OutputStream outputStream
;
76 private InputStream inputStream
;
77 private InputStream errorStream
;
79 // Handle to the child process - cast to HANDLE before use.
80 private int procHandle
;
82 // Exit code of the child if it has exited.