Process trees and termination
roger riggs
roger.riggs at oracle.com
Thu Jun 26 14:33:23 UTC 2014
Hi Paul,
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
process name,
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
is concrete
and not some arbitrary object hiding behind the interface.
Roger
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.
>
>
> Cheers,
> Paul
>
>
> On Wed, Jun 25, 2014 at 4:52 PM, roger riggs <roger.riggs at oracle.com
> <mailto:roger.riggs at oracle.com>> wrote:
>
> Hi,
>
> 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 [1]
> includes:
> - ProcessHandle class to provide handles to processes, their
> children,
> 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
> processes
> will be added in a later update.
>
> Comments appreciated, Roger
>
> [1] http://cr.openjdk.java.net/~rriggs/ph-apidraft/
> <http://cr.openjdk.java.net/%7Erriggs/ph-apidraft/>
>
>
More information about the core-libs-dev
mailing list