Update mode of the Attach API communication pipe.

XMLWordPrintable

    • b26
    • generic
    • windows

      Windows Attach API client creates a 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 client tries to create a pipe with the same name, it fails with ERROR_PIPE_BUSY.
        But max instances value has to be set by the 1st creator of the pipe.
        With FILE_FLAG_FIRST_PIPE_INSTANCE CreateNamedPipe fails with ERROR_ACCESS_DENIED error when not the 1st creator of the pipe

      - 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.

            Assignee:
            Alex Menkov
            Reporter:
            Alex Menkov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: