RFR: 8291067: macOS should use O_CLOEXEC instead of FD_CLOEXEC [v2]
Gerard Ziemski
gziemski at openjdk.org
Thu Sep 29 14:43:27 UTC 2022
On Thu, 29 Sep 2022 07:47:55 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Gerard Ziemski has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - add test to verify that open(O_CLOEXEC) implies FD_CLOEXEC on macOS
>> - assume O_CLOEXEC on macOS
>
> test/hotspot/gtest/runtime/test_os.cpp line 892:
>
>> 890:
>> 891: TEST_VM(os, open_O_CLOEXEC) {
>> 892: #if defined(__APPLE__)
>
> Does this not work on other OS ie Linux?
It works on Linux too and originally I had it for both Mac and Linux, but I figured that since this issue (dropping `FD_CLOEXEC` and relaying on only `O_CLOEXEC`) is focused just on MacOS, then that's the platform we should test.
I can add Linux here though, if you think it would be useful.
-------------
PR: https://git.openjdk.org/jdk/pull/9663
More information about the hotspot-runtime-dev
mailing list