JDK-8007454 : (process) SetHandleInformation parameters DWORD (not BOOLEAN)
  • Type: Bug
  • Status: Closed
  • Resolution: Fixed
  • Component: core-libs
  • Sub-Component: java.lang
  • Priority: P4
  • Affected Version: 8
  • OS: windows
  • CPU: x86
  • Submit Date: 2013-02-04
  • Updated Date: 2014-02-12
  • Resolved Date: 2013-02-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availabitlity Release.

To download the current JDK release, click here.
JDK 7 JDK 8
7u60Fixed 8 b82Fixed
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
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