RFR: 8228343: JCMD and attach fail to work across Linux Container boundary [v2]

Kevin Walls kevinw at openjdk.java.net
Wed Jun 9 13:03:34 UTC 2021


On Wed, 9 Jun 2021 12:37:19 GMT, Yasumasa Suenaga <ysuenaga at openjdk.org> wrote:

>> Kevin Walls has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   One less File reference.
>
> src/jdk.attach/linux/classes/sun/tools/attach/VirtualMachineImpl.java line 81:
> 
>> 79:             File f = createAttachFile(pid, ns_pid);
>> 80:             // Keep a canonical version of File, to delete, in case target process ends and /proc link has gone:
>> 81:             File f2 = f.getCanonicalFile();
> 
> Do we need to keep `f`? I think we can replace them to `createAttachFile(pid, ns_pid).getCanonicalFile()`.

That's true, we don't really need them both.

-------------

PR: https://git.openjdk.java.net/jdk/pull/4418


More information about the serviceability-dev mailing list