diff options
| author | zousar <[email protected]> | 2026-04-13 14:08:09 -0600 |
|---|---|---|
| committer | zousar <[email protected]> | 2026-04-13 14:08:09 -0600 |
| commit | e7d3065cf47c9d8430be409a0c53422aea2e3532 (patch) | |
| tree | ab8e0c3f250585c798324b0d5ab410ff6885161c /src/zencore/filesystem.cpp | |
| parent | fix utf characters in source code (#953) (diff) | |
| download | zen-e7d3065cf47c9d8430be409a0c53422aea2e3532.tar.xz zen-e7d3065cf47c9d8430be409a0c53422aea2e3532.zip | |
Stop using O_CLOEXEC in shm_open
Diffstat (limited to 'src/zencore/filesystem.cpp')
| -rw-r--r-- | src/zencore/filesystem.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/zencore/filesystem.cpp b/src/zencore/filesystem.cpp index 70d0f32b3..debe51cc9 100644 --- a/src/zencore/filesystem.cpp +++ b/src/zencore/filesystem.cpp @@ -3462,11 +3462,12 @@ public: ZEN_UNUSED(SystemGlobal); std::string InstanceMapName = fmt::format("/{}", Name); - ScopedFd FdGuard(shm_open(InstanceMapName.c_str(), O_RDWR | O_CREAT | O_CLOEXEC, 0666)); + ScopedFd FdGuard(shm_open(InstanceMapName.c_str(), O_RDWR | O_CREAT, 0666)); if (!FdGuard) { return {}; } + fcntl(FdGuard.Fd, F_SETFD, FD_CLOEXEC); fchmod(FdGuard.Fd, 0666); int Result = ftruncate(FdGuard.Fd, Size); |