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