Process trees and termination
roger.riggs at oracle.com
Thu Jun 26 14:33:23 UTC 2014
Whether an interface or class, it is desirable that Process have the new
capabilities of iterating over children and destroying the tree and other
possible additions retrieving information about the process like the
start time, etc. If Process had a ProcessHandle then the operations would
less usable such as p.getProcessHandle().allChildren() or similar.
From a security point of view, it is useful to know that ProcessHandle
and not some arbitrary object hiding behind the interface.
On 6/26/2014 9:43 AM, Paul Benedict wrote:
> I have a question on the way this is modeled. By introducing a
> superclass, Process becomes a type of ProcessHandle. That doesn't seem
> right to me. I expect a Process to have a handle (not be one). Also I
> think these operations may make more sense as an interface.
> On Wed, Jun 25, 2014 at 4:52 PM, roger riggs <roger.riggs at oracle.com
> <mailto:roger.riggs at oracle.com>> wrote:
> The next step for JEP 102, Process API Updates is to provide an API to
> enumerate the hierarchy of processes and to be able to terminate a
> process tree.
> This draft javadoc <http://bussund0416/%7Erriggs/pdoc/>update 
> - ProcessHandle class to provide handles to processes, their
> parent, process id and liveness
> - Process extends ProcessHandle and inherits the new behaviors
> - Method destroyProcessTree() terminates a process tree
> Additional functions related to termination and information about
> will be added in a later update.
> Comments appreciated, Roger
>  http://cr.openjdk.java.net/~rriggs/ph-apidraft/
More information about the core-libs-dev