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().
------------- Commit messages: - 8364312: debug agent should set FD_CLOEXEC flag rather than explicitly closing every open file Changes: https://git.openjdk.org/jdk/pull/26568/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26568&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8364312 Stats: 49 lines in 1 file changed: 19 ins; 18 del; 12 mod Patch: https://git.openjdk.org/jdk/pull/26568.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26568/head:pull/26568 PR: https://git.openjdk.org/jdk/pull/26568