Processes started from ProcessBuilder use platform resources for the process itself and to communicate between the invoking Java runtime and the launched process. The resources include file descriptors on Linux and handles on Windows for pipes and files used for input and output.
A robust application using Process needs to know how to use the API under both normal and exception conditions and how to cleanup to free resources.
The responsibility of the application should be clear in the javadoc including any need to close streams, files, and handle a process that is unresponsive.
A robust application using Process needs to know how to use the API under both normal and exception conditions and how to cleanup to free resources.
The responsibility of the application should be clear in the javadoc including any need to close streams, files, and handle a process that is unresponsive.
- csr for
-
JDK-8356311 Clarify java.lang.Process resource cleanup
-
- Draft
-