United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-8007454 : (process) SetHandleInformation parameters DWORD (not BOOLEAN)

Details
Type:
Bug
Submit Date:
2013-02-04
Status:
Closed
Updated Date:
2014-02-12
Project Name:
JDK
Resolved Date:
2013-02-20
Component:
core-libs
OS:
windows
Sub-Component:
java.lang
CPU:
x86
Priority:
P4
Resolution:
Fixed
Affected Versions:
8
Fixed Versions:

Related Reports
Backport:
Backport:

Sub Tasks

Description
While new process creation the stderror, stdoutput, stdinput streams could be redirected to parent console or abstract pipe. At the same time the child process inherits the ability to close the redirected streams that is not the desirable event. We need to protect redirected streams from closing in child process. 
For that purpose the MS API [SetHandleInformation] function have to be called with appropriate arguments. 
                                    

Comments
URL:   http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/0a2b308cc82d
User:  lana
Date:  2013-03-15 17:04:08 +0000

                                     
2013-03-15
URL:   http://hg.openjdk.java.net/jdk8/tl/jdk/rev/0a2b308cc82d
User:  uta
Date:  2013-02-20 12:38:39 +0000

                                     
2013-02-20
The function calls like
    SetHandleInformation(si.hStdOutput, HANDLE_FLAG_INHERIT, TRUE);
need to be changed to 
    SetHandleInformation(si.hStdOutput,
        HANDLE_FLAG_INHERIT | HANDLE_FLAG_PROTECT_FROM_CLOSE,
        HANDLE_FLAG_INHERIT | HANDLE_FLAG_PROTECT_FROM_CLOSE);
                                     
2013-02-04



Hardware and Software, Engineered to Work Together