If a process exits during an attempt to attach to it, the .attach_pid file
will not be removed properly, if the path used included symbolic link traversal, which is typically done for "/proc/<pid>/cwd/". Using getCanonicalFile() before the
initial file is created should prevent this edge case for left over files.

  Webrev: http://cr.openjdk.java.net/~gadams/8214300/webrev.00/index.html
  Issue: https://bugs.openjdk.java.net/browse/JDK-8214300

Testing is in progress for every attach test I can find, but there is no
explicit test available for the case where the attachee exits while the attacher
is making the initial connection.

Reply via email to