Process API Updates (JEP 102) (original) (raw)
David M. Lloyd david.lloyd at redhat.com
Tue Mar 25 12:17:06 UTC 2014
- Previous message: Process API Updates (JEP 102)
- Next message: Process API Updates (JEP 102)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 03/24/2014 04:11 PM, roger riggs wrote:
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.
There are two features we would definitely like to see added:
- NIO Channel interface for process streams
- The ability to pass additional channels to child processes
#1 seems relatively straightforward, but admittedly it's not clear how #2 might be possible from the child process side.
--
- DML
- Previous message: Process API Updates (JEP 102)
- Next message: Process API Updates (JEP 102)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]