RFR: 8291067: macOS should use O_CLOEXEC instead of FD_CLOEXEC [v4]
Daniel D. Daugherty
dcubed at openjdk.org
Wed Nov 16 20:08:27 UTC 2022
On Wed, 16 Nov 2022 19:45:10 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:
>> O_CLOEXEC is also available on macOS (__DARWIN_C_LEVEL >= 200809L), so use it same as on linux.
>
> Gerard Ziemski has updated the pull request incrementally with one additional commit since the last revision:
>
> create our own test file, to guarantee it will exist
Thumbs up on this latest version.
test/hotspot/gtest/runtime/test_os.cpp line 893:
> 891: TEST_VM(os, open_O_CLOEXEC) {
> 892: #if !defined(_WIN32)
> 893: int err = system("touch test.txt"); // create the "test.txt" file
Where will the new test file get created and what will clean it up?
If it's created in the JTREG scratch dir, then I believe it is cleaned
up automatically.
-------------
Marked as reviewed by dcubed (Reviewer).
PR: https://git.openjdk.org/jdk/pull/9663
More information about the hotspot-runtime-dev
mailing list