Hi Roger

This looks great already. My feedback is about process destruction:

Why isn't ProcessHandle::isDestroyForcible a static method?

For ProcessHandle::destroy and Process::destroy, I'd like to propose replacing "Whether the process represented by this Process object is forcibly terminated or not is implementation dependent."
with:
"The process represented by this Process object is forcibly terminated if and only if isDestroyForcible returns true."

Process::destroyForcibly contains the following phrase: "The default implementation of this method invokes destroy() and so may not forcibly terminate the process." Why doesn't the default implementation throw UnsupportedOperationException if forcible termination is not supported on/implemented for the current platform? If I write code like: process.destroyForcibly().waitFor(), I'd assume it would finish in a timely manner, but due to the default implementation, this may actually not finish at all.

Kind regards, Anthony


On 10/02/2015 0:25, Roger Riggs wrote:
Hi,

After a protracted absence from working on JEP 102, the updated API draft
provides access to process hierarchies and individual process information; as permitted by the OS. The relationship between Process and ProcessHandle
is clarified and the security model validated.

Both Processes and ProcessHandles can be monitored using CompletableFuture
for termination and to trigger additional actions on Process exit.
Information about processes includes the total cputime, starttime, user,
executable, and arguments.

Please review and comment:
   http://cr.openjdk.java.net/~rriggs/ph-apidraft/

Thanks, Roger






Reply via email to