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

Update mode of the Attach API communication pipe.

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • 25
    • None
    • core-svc
    • None
    • generic
    • windows

      Windows Attach API client creates named pipe to communicate with target VM (CreateNamedPipe).
      It makes sense to update the pipe mode:
      Add FILE_FLAG_FIRST_PIPE_INSTANCE to the open mode.
      The pipe is created with max instances argument == 1, so if another clients tries to create a pipe with the same name, it fails with ERROR_PIPE_BUSY.
      But max instances value is set by the 1st creator of the pipe.
      With FILE_FLAG_FIRST_PIPE_INSTANCE CreateNamedPipe fails with ERROR_ACCESS_DENIED error.

      Add PIPE_REJECT_REMOTE_CLIENTS to the pipe mode.
      Attach API works only with local JVM processes, and the flag causes connections from remote clients are automatically rejected.

            amenkov Alex Menkov
            amenkov Alex Menkov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: