PosixProcess.java (exitValue): Implement here.
* java/lang/PosixProcess.java (exitValue): Implement here. Throw IllegalThreadStateException if process hasn't exited yet. * java/lang/natPosixProcess.cc (exitValue): Removed. (waitFor): Only check thread interrupted status if waitpid() returned an error. Use WIFEXITED and WEXITSTATUS to process process's exit value. From-SVN: r45766
This commit is contained in:
parent
749ced524c
commit
4f7279ab3e
3 changed files with 28 additions and 28 deletions
|
@ -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 ()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue