aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzousar <[email protected]>2026-04-13 14:42:13 -0600
committerzousar <[email protected]>2026-04-13 14:42:13 -0600
commitecd4acb89406cfa573d1819532dcaec2c44113f5 (patch)
tree46a8a67de6d9afdffa02e7f0b5d918fb46d03ffe /src
parentChangelog (diff)
downloadzen-ecd4acb89406cfa573d1819532dcaec2c44113f5.tar.xz
zen-ecd4acb89406cfa573d1819532dcaec2c44113f5.zip
Removing CLOEXEC use on shared memory descriptors
According to documentation, shm_open already sets O_CLOEXEC.
Diffstat (limited to 'src')
-rw-r--r--src/zencore/filesystem.cpp1
-rw-r--r--src/zenutil/zenserverprocess.cpp4
2 files changed, 0 insertions, 5 deletions
diff --git a/src/zencore/filesystem.cpp b/src/zencore/filesystem.cpp
index debe51cc9..5160bfdc6 100644
--- a/src/zencore/filesystem.cpp
+++ b/src/zencore/filesystem.cpp
@@ -3467,7 +3467,6 @@ public:
{
return {};
}
- fcntl(FdGuard.Fd, F_SETFD, FD_CLOEXEC);
fchmod(FdGuard.Fd, 0666);
int Result = ftruncate(FdGuard.Fd, Size);
diff --git a/src/zenutil/zenserverprocess.cpp b/src/zenutil/zenserverprocess.cpp
index 25e9cfa5d..1fe373228 100644
--- a/src/zenutil/zenserverprocess.cpp
+++ b/src/zenutil/zenserverprocess.cpp
@@ -197,7 +197,6 @@ ZenServerState::Initialize()
ThrowLastError("Could not open a shared memory object");
}
}
- fcntl(Fd, F_SETFD, FD_CLOEXEC);
fchmod(Fd, 0666);
void* hMap = (void*)intptr_t(Fd);
@@ -250,7 +249,6 @@ ZenServerState::InitializeReadOnly()
{
return false;
}
- fcntl(Fd, F_SETFD, FD_CLOEXEC);
void* hMap = (void*)intptr_t(Fd);
void* pBuf = mmap(nullptr, MapSize, PROT_READ, MAP_SHARED, Fd, 0);
@@ -658,7 +656,6 @@ ZenServerInstanceInfo::Create(const Oid& SessionId, const InstanceInfoData& Data
{
ThrowLastError("Could not create instance info shared memory");
}
- fcntl(Fd, F_SETFD, FD_CLOEXEC);
fchmod(Fd, 0666);
if (ftruncate(Fd, kInstanceInfoSize) < 0)
@@ -726,7 +723,6 @@ ZenServerInstanceInfo::OpenReadOnly(const Oid& SessionId)
{
return false;
}
- fcntl(Fd, F_SETFD, FD_CLOEXEC);
void* pBuf = mmap(nullptr, kInstanceInfoSize, PROT_READ, MAP_SHARED, Fd, 0);
if (pBuf == MAP_FAILED)