RFR: 8228343: JCMD and attach fail to work across Linux Container boundary [v2]
Kevin Walls
kevinw at openjdk.java.net
Wed Jun 9 13:21:16 UTC 2021
On Wed, 9 Jun 2021 13:00:13 GMT, Kevin Walls <kevinw at openjdk.org> wrote:
>> 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.
Builds and tests OK, thanks.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4418
More information about the serviceability-dev
mailing list