commit 3e2dcb0
shrub
·
2026-07-15 15:27:10 +0000 UTC
parent 021baa5
portable
1 files changed,
+5,
-1
+5,
-1
1@@ -850,8 +850,12 @@ static int create_shm_file(size_t size)
2 return -1;
3 }
4 char *name = alloc_concat(runtime_dir, template);
5- fd = mkostemp(name, O_CLOEXEC);
6+ fd = mkstemp(name);
7 if (fd >= 0) {
8+ int flags = fcntl(fd, F_GETFD);
9+ if (flags >= 0) {
10+ fcntl(fd, F_SETFD, flags | FD_CLOEXEC);
11+ }
12 unlink(name);
13 if (ftruncate(fd, size) == 0) {
14 free(name);