Process API Updates (JEP 102)

roger riggs roger.riggs at oracle.com
Mon Mar 24 21:11:06 UTC 2014


Hi,

I'm starting to work on JEP 102, Process API Updates for JDK 9.
The use cases identified include test execution and build systems such
as Jtreg and Hudson/Jenkins. And there is a use-case for using Java
to monitor the health of a more complex system where the processes
are not spawned by the same manager.

The current API of Process itself is pretty complete with the addition 
of a getPid
method to enable identification of subprocesses spawned by the application
and allow external identification.  It will not be possible to intercept 
the input,
output and error streams of an arbitrary process.

 From the scope of the JEP, a fairly simple API seems sufficient.
  - Enumerate the direct children
  - The rest of the functions are similar to Process
    - to terminate a process, forcibly and normally
    - to destroy a process and all of its children recursively
    - to check if one is alive
    - to waitFor for termination and retrieve the exit status

Are there use cases for which this is insufficient?  Please comment.

Thanks, Roger




More information about the core-libs-dev mailing list