| 64 | LockGuard _(m_mutex); |
| 65 | |
| 66 | if (key != IPC_PRIVATE) |
| 67 | { |
| 68 | if (auto it = m_ids.find(key); it != m_ids.end()) |
| 69 | { |
| 70 | if (shmflg & IPC_EXCL) |
| 71 | return BAN::Error::from_errno(EEXIST); |
| 72 | |
| 73 | const auto& object = m_objects[it->value]; |
| 74 | if (object->info.shm_segsz < size) |
| 75 | return BAN::Error::from_errno(EINVAL); |
| 76 | |
| 77 | const int flags = |
| 78 | (shmflg & S_IRUSR ? O_RDONLY : 0) | |
no test coverage detected