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

Windows IPv6 Socket implementation doesn't set the handle to not inherit

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 5.0, 6
    • Fix Version/s: 7
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b21
    • CPU:
      x86
    • OS:
      windows_2003, windows_xp

      Backports

        Description

        See http://forums.java.net/jive/thread.jspa?threadID=29654&tstart=0

        You can reproduce this issue running on Windows XP or 2003 with IPv6 enabled.

        --- begin code ---
        public class SockTest
        {
            public static void main(String[] args) throws Exception {
                ServerSocket ss = new ServerSocket(4444);
                Runtime.getRuntime().exec(new String[] {"notepad.exe"});
                ss.close();
            }
        }
        --- end code ---

        The above testcase spawns a notepad. Notepad inherits the handle to the socket, so if you try and re-execute the test if fails with "BindException: Address already in use".

        This is reproducible with Java SE 5, 6, and 7.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                chegar Chris Hegarty
                Reporter:
                chegar Chris Hegarty
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: