On Tue, 5 Aug 2025 10:32:42 GMT, Guanqiang Han <g...@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(). src/jdk.jdwp.agent/unix/native/libjdwp/exec_md.c line 59: > 57: #else > 58: #define FD_DIR "/proc/self/fd" > 59: #endif Nitpicking, but this FD_DIR define now has a function between its definition here, and where it's used in markDescriptorsCloseOnExec. It would make sense to move it down to be just before that function. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26568#discussion_r2256793737