RFR: 8291067: macOS should use O_CLOEXEC instead of FD_CLOEXEC [v2]

David Holmes dholmes at openjdk.org
Thu Sep 29 07:51:18 UTC 2022


On Wed, 28 Sep 2022 17:21:53 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 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?

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

PR: https://git.openjdk.org/jdk/pull/9663


More information about the hotspot-runtime-dev mailing list