Sorry, coding before coffee this morning.
Fixed.
On 11/29/18, 11:54 AM, JC Beyler wrote:
Hi Gary,
Is there a reason why only
http://cr.openjdk.java.net/~gadams/8214300/webrev.00/src/jdk.attach/linux/classes/sun/tools/attach/VirtualMachineImpl.java.udiff.html
<http://cr.openjdk.java.net/%7Egadams/8214300/webrev.00/src/jdk.attach/linux/classes/sun/tools/attach/VirtualMachineImpl.java.udiff.html>
actually has the assignment after the call ?
f = f.getCanonicalFile()?
(Nit, there seems to be a space missing before the =).
In the other two files, you just call the method but don't update the
variable f making the call useless, no? (The patch in the bug has the
assigments for all the cases),
Jc
On Thu, Nov 29, 2018 at 8:23 AM Gary Adams <gary.ad...@oracle.com
<mailto:gary.ad...@oracle.com>> wrote:
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
<http://cr.openjdk.java.net/%7Egadams/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.
--
Thanks,
Jc