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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 14
    • 1.8, 8, 11, 14
    • core-libs
    • None
    • b16

      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.

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

              Created:
              Updated:
              Resolved: