On Mon, 16 Mar 2026 14:41:51 GMT, Kieran Farrell <[email protected]> wrote:

>> src/hotspot/os/linux/os_linux.cpp line 5405:
>> 
>>> 5403:   // limit proc file read to 50ms
>>> 5404:   while ((dentp = readdir(dirp)) != nullptr) {
>>> 5405:     if (isdigit(dentp->d_name[0])) fds++;
>> 
>> This can also be an assert(isdigit). There is nothing else in that directory.
>
> the proc file can include directory entries resresened by '.' or '..' hence 
> using 'isdigit(dentp->d_name[0])' 
> 
> if I run the below on linux
> 
> 
> ls -a /proc/self/fd 
> .  ..  0  1  2  3

And these are returned by opendir iteration?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27971#discussion_r2940961668

Reply via email to