Process API Updates (JEP 102)

Ron Pressler ron at paralleluniverse.co
Tue Aug 26 11:25:19 UTC 2014


I might be a little late to this party, but recently I've had a (rather
frustrating) need for the ability to execve a process rather than fork-exec
it. I understand that the ability to exec (replace the current process's
image) is also available on Windows. This operation (on ProcessBuilder?),
which never returns, would have the same semantics as
System.exit(pb.start().waitFor()), only it would replace the current JVM
process (i.e. maintain the same pid/handle) with the command.

This is required when a JVM process is used to set up and launch another,
JVM or other, process, but we'd want the user running the program to be
oblivious to the setup process (because, say, they want to monitor the
running program with some OS tool).

Ron



More information about the core-libs-dev mailing list