JDK-8007454 : (process) SetHandleInformation parameters DWORD (not BOOLEAN)
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 8
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: windows
  • CPU: x86
  • Submitted: 2013-02-04
  • Updated: 2014-02-12
  • Resolved: 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 Availability Release.

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