review request: 4244896: (process) Provide System.getPid(), System.killProcess(String pid) (original) (raw)
Rob McKenna rob.mckenna at oracle.com
Wed Apr 11 23:48:23 UTC 2012
- Previous message: RFR 7116200: (cs) test/java/nio/charset/coders/StreamTimeout.java fails with "Address already in use"
- Next message: review request: 4244896: (process) Provide System.getPid(), System.killProcess(String pid)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi folks,
I'm hoping for some feedback on the above. Webrev:
http://cr.openjdk.java.net/~robm/4244896/webrev.00/
This bug adds two abstract methods to Process.java with the intention of:
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)
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 completed separately.
Notes:
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.
Thanks!
-Rob
- Previous message: RFR 7116200: (cs) test/java/nio/charset/coders/StreamTimeout.java fails with "Address already in use"
- Next message: review request: 4244896: (process) Provide System.getPid(), System.killProcess(String pid)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]