RFR: 8261242: [Linux] OSContainer::is_containerized() returns true when run outside a container [v6]
Severin Gehwolf
sgehwolf at openjdk.org
Tue Jun 25 13:54:47 UTC 2024
On Thu, 20 Jun 2024 17:37:05 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> Severin Gehwolf has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Remove problem listing of PlainRead which is reworked here
>
> src/hotspot/os/linux/cgroupSubsystem_linux.cpp line 422:
>
>> 420: * (12) super options: matched with '%s' and captured in 'tmpcgroups'
>> 421: */
>> 422: if (sscanf(p, "%*d %*d %*d:%*d %s %s %s%*[^-]- %s %*s %s", tmproot, tmpmount, mount_opts, tmp_fs_type, tmpcgroups) == 5) {
>
> The only difference to v1 is that we parse the super options (12), right? Could we factor out the parsing into a helper function? Or, alternatively, at least `#define` the scanf format somewhere up top, including the nice comment, and reuse that format string?
That's correct. I've moved it into a local helper function. Thanks!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18201#discussion_r1652863523
More information about the serviceability-dev
mailing list