RFR: 8324668: JDWP process management needs more efficient file descriptor handling [v4]
Chris Plummer
cjplummer at openjdk.org
Mon Jan 29 19:23:40 UTC 2024
On Mon, 29 Jan 2024 17:51:36 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:
>> Jaikiran Pai has updated the pull request incrementally with three additional commits since the last revision:
>>
>> - add a log message to help debuggability
>> - improve code comments
>> - David's review - use standard isdigit instead of custom isAsciiDigit
>
> src/jdk.jdwp.agent/unix/native/libjdwp/exec_md.c line 108:
>
>> 106: if (isdigit(dirp->d_name[0]) &&
>> 107: (fd = strtol(dirp->d_name, NULL, 10)) >= from_fd) {
>> 108: (void)close(fd);
>
> I'd really, really like to check `close()` for errors and report any.
I agree. If we are seeing issues with close(), probably it is best to fail. That way we'll get a bug report and can figure out exactly why it is failing rather than blindly proceeding without having properly closed all fds.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17588#discussion_r1470089453
More information about the serviceability-dev
mailing list