United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6428742 (process) Call CreateProcess with bInheritHandles=FALSE ?
6428742 : (process) Call CreateProcess with bInheritHandles=FALSE ?

Details
Type:
Bug
Submit Date:
2006-05-22
Status:
Open
Updated Date:
2013-02-04
Project Name:
JDK
Resolved Date:
Component:
core-libs
OS:
generic,windows_xp
Sub-Component:
java.lang
CPU:
generic
Priority:
P3
Resolution:
Unresolved
Affected Versions:
6,6u13
Targeted Versions:
7-pool

Related Reports
Backport:
Relates:
Relates:

Sub Tasks

Description
Currently, on Windows, Runtime.exec is implemented by calling
CreateProcess with the bInheritHandles argument set to TRUE,
which causes open handles to not be closed if they are not
explicitly set to be non-inherited.  This is the underlying cause
of many subtle bugs, such as

6347873: (so) Ports opened with ServerSocketChannel blocks when using Runtime.exec
http://monaco.sfbay/detail.jsf?cr=6347873

On Unix, we try hard to close all handles (except for standard handles, of course).
Why not also on Windows?

                                    

Comments
EVALUATION

Submitter has a point.  Very risky to fix.  
Early dolphin seems like a good time to experiment with changing this.
                                     
2006-05-22



Hardware and Software, Engineered to Work Together