On Mon, 29 Jan 2024 19:21:05 GMT, Chris Plummer <cjplum...@openjdk.org> wrote:

>> 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.

If we are going to check close for errors then we will have to know for certain 
we are only trying to close open fd's, and we will have to deal with EINTR. I 
would think this is a "best effort" to close open FD's and not something we 
have to care about in detail.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17588#discussion_r1470666267

Reply via email to