code: private int openDoor(int pid) throws IOException {
          String path = tmpdir + "/.java_pid" + pid;;
          fd = open(path);
  
          // Check that the file owner/permission to avoid attaching to
          // bogus process
          try {
              checkPermissions(path);
          } catch (IOException ioe) {
              close(fd);
              throw ioe;
          }
          return fd;
      }
docs: The door is attached to .java_pid<pid> in the temporary directory.