RFR: 8210549: Runtime.exec: in closeDescriptors(), use FD_CLOEXEC instead of close() [v4]

Thomas Stuefe stuefe at openjdk.org
Tue Jun 17 05:56:17 UTC 2025


On Mon, 16 Jun 2025 18:32:15 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> Thomas Stuefe has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains five commits:
>> 
>>  - Merge branch 'master' into JDK-8210549-Runtime-exec-in-closeDescriptors-use-FD_CLOEXEC-instead-of-close-
>>  - Merge branch 'openjdk:master' into JDK-8210549-Runtime-exec-in-closeDescriptors-use-FD_CLOEXEC-instead-of-close-
>>  - Merge branch 'openjdk:master' into JDK-8210549-Runtime-exec-in-closeDescriptors-use-FD_CLOEXEC-instead-of-close-
>>  - close dir fd on fcntl error
>>  - Mark fds with cloexec, plus test
>
> test/jdk/java/lang/ProcessBuilder/FDLeakTest/FDLeakTest.java line 59:
> 
>> 57:     //
>> 58:     // What should happen: In the child process, between the initial fork and the exec of the target binary, we should
>> 59:     // close all filedescriptors that are not stdin/out/err. If that works, the child process should not see any other
> 
> Can you shorten the long lines to < 100 chars. It makes side-by-side reviews easier.

Done

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25301#discussion_r2151378709


More information about the core-libs-dev mailing list