RFR 8067748: (process) Child is terminated when parent's console is closed [win]
martinrb at google.com
Thu Jan 22 20:01:54 UTC 2015
Not really reviewing, but cheerleading - this area is really hard!
Historically I tried to avoid touching windows api and avoid changing any
aspect of process termination, since whichever way you go, someone will be
relying on the historic behavior.
On Thu, Jan 22, 2015 at 6:37 AM, Ivan Gerasimov <ivan.gerasimov at oracle.com>
> It was reported that the fix for JDK-8023130 ((process)
> ProcessBuilder#inheritIO does not work on Windows) had caused a regression.
> It manifests itself in the following situation:
> 1) A console java application starts a child process.
> 2) The parent then exits without waiting for the child to complete, the
> child is running.
> 3) The console window, the parent app was started from, is closed.
> 4) The child process is unexpectedly terminated.
> The solution is to tighten the cases in which we drop CREATE_NO_WINDOW
> flag: it is dropped only any IO stream of the parent is going to be
> inherited by the child.
> Only in that later case keeping the child attached to console makes sense.
> The fix was tested manually: the inheritIO behavior is preserved, the
> regression is gone.
> Unfortunately, no regression test is attached.
> It's hard to create a test, which involves closing the console window and
> manipulating the detached child application.
> Would you please help review the fix?
> BUGURL: https://bugs.openjdk.java.net/browse/JDK-8067748
> WEBREV: http://cr.openjdk.java.net/~igerasim/8067748/0/webrev/
> Sincerely yours,
More information about the core-libs-dev