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

SelectorProvider.inheritedChannel() returns TCP socket channel for Unix domain socket

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 1.8, 8, 11, 14
    • Fix Version/s: 14
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b16

      Description

      When Java is started by a system launcher daemon such as 'xinetd' SelectorProvider.inheritedChannel() is supposed to return a Channel attached to the socket provided by the launcher. It is specified to return particular NetworkChannel sub-types for various network connection/socket types. It is currently not specified what/if anything is returned should the socket be something different like a Unix domain socket.

      The current behavior is to incorrectly return (Inet) SocketChannel types which are wrong because the local and remote address types are different.

      The simplest solution at this point, is to return null for listener (unix domain) sockets and a simple ByteChannel for connected Unix domain sockets, which will maintain the existing useful behavior.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              michaelm Michael McMahon
              Reporter:
              michaelm Michael McMahon
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: