aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/lang/PosixProcess.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/lang/PosixProcess.java')
-rw-r--r--libjava/java/lang/PosixProcess.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/libjava/java/lang/PosixProcess.java b/libjava/java/lang/PosixProcess.java
index 3618259..459f76c 100644
--- a/libjava/java/lang/PosixProcess.java
+++ b/libjava/java/lang/PosixProcess.java
@@ -26,7 +26,13 @@ import java.io.IOException;
final class ConcreteProcess extends Process
{
public native void destroy ();
- public native int exitValue ();
+
+ public int exitValue ()
+ {
+ if (! hasExited)
+ throw new IllegalThreadStateException("Process has not exited");
+ return status;
+ }
public InputStream getErrorStream ()
{