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

(process) Call CreateProcess with bInheritHandles=FALSE ?

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 7-pool
    • 6, 6u13
    • core-libs
    • generic
    • generic, windows_xp

        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?

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

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: