Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6428742

(process) Call CreateProcess with bInheritHandles=FALSE ?

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 6, 6u13
    • Fix Version/s: 7-pool
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic, windows_xp

      Backports

        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?

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  uta Alexey Utkin (Inactive)
                  Reporter:
                  martin Martin Buchholz
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: