review request: 4244896: (process) Provide System.getPid(), System.killProcess(String pid)
rob.mckenna at oracle.com
Wed Apr 11 16:48:23 PDT 2012
I'm hoping for some feedback on the above. Webrev:
This bug adds two abstract methods to Process.java with the intention of:
1) providing a facility to implement a destroyForcibly method. In
practical terms this means provide a method that will send a SIGKILL to
the subprocess in *nix environments as opposed to the SIGTERM that is
currently being sent. (Windows' destroy() method effectively behaves
like this already)
2) providing a facility to check whether the subprocess is still alive.
As per the bug report the toString/pid work has been left to be
a) It has been pointed out to me that the addition of abstract methods
to java.lang.Process should be discussed, particularly as to whether
default methods should be provided.
b) In src/windows/native/java/lang/ProcessImpl_md.c I chose to use
WaitForSingleObject on the off chance that a process may choose to
return STILL_ACTIVE as an error code.
More information about the core-libs-dev