Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.lang.Win32Process.destroy() causes varying exitValue().

843829Sep 7 2005 — edited Sep 7 2005
I am using
Runtime.exec
to start a python process that executes indefinately (it simply has a sleep statement in an infinite loop). I have noticed that after I call
destroy()
on the python
Process
object, the object has an
exitValue()
of 1, but on the odd occassion, the
exitValue()
is 0. (BTW this is a unit test hence the simplicity of the python).

I am running this on Windows XP, but would like advice based on most platforms, including Linux and Solaris (though I imagine the latter two are more straight forward).

Is it simply that I cannot rely on
exitValue()
after calling
destroy()
or is it that I am doing something wrong.

Regards,
David
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 5 2005
Added on Sep 7 2005
2 comments
104 views