Skip to content

Commit 2673453

Browse files
committed
Try to fix permission issues under linux
1 parent 84bb801 commit 2673453

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/libipc/platform/posix/shm_posix.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ id_t acquire(char const * name, std::size_t size, unsigned mode) {
6868
flag |= O_CREAT;
6969
break;
7070
}
71-
int fd = ::shm_open(op_name.c_str(), flag, 0);
71+
int fd = ::shm_open(op_name.c_str(), flag, S_IRUSR | S_IWUSR |
72+
S_IRGRP | S_IWGRP |
73+
S_IROTH | S_IWOTH);
7274
if (fd == -1) {
7375
ipc::error("fail shm_open[%d]: %s\n", errno, op_name.c_str());
7476
return nullptr;

0 commit comments

Comments
 (0)