RFR: 8364312: debug agent should set FD_CLOEXEC flag rather than explicitly closing every open file [v3]

Chris Plummer cjplummer at openjdk.org
Tue Aug 5 20:36:03 UTC 2025


On Tue, 5 Aug 2025 10:32:42 GMT, Guanqiang Han <ghan at openjdk.org> wrote:

>> Create a new function that marks all file descriptors found in /proc/self/fd with the FD_CLOEXEC flag to ensure they are automatically closed upon execution of a new program via exec().
>
> Guanqiang Han has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
> 
>  - a small fix
>  - Merge remote-tracking branch 'upstream/master' into 8364312
>  - Update exec_md.c
>    
>    correct an compilation error
>  - 8364312: debug agent should set FD_CLOEXEC flag rather than explicitly closing every open file
>    
>    Create a new function that marks all file descriptors found in /proc/self/fd with the FD_CLOEXEC flag to ensure they are automatically closed upon execution of a new program via exec().

Looks good and passes all my CI testing. Note I can't test AIX.

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

Marked as reviewed by cjplummer (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/26568#pullrequestreview-3089634860


More information about the serviceability-dev mailing list