Jan Beich 2024-06-13 12:20:14 +00:00 committed by GitHub
parent e6d10539af
commit 4842eb83b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -814,7 +814,8 @@ bool envEnabled(const std::string& env) {
} }
std::pair<int, std::string> openExclusiveShm() { std::pair<int, std::string> openExclusiveShm() {
std::string name = g_pTokenManager->getRandomUUID(); // Only absolute paths can be shared across different shm_open() calls
std::string name = "/" + g_pTokenManager->getRandomUUID();
for (size_t i = 0; i < 69; ++i) { for (size_t i = 0; i < 69; ++i) {
int fd = shm_open(name.c_str(), O_RDWR | O_CREAT | O_EXCL, 0600); int fd = shm_open(name.c_str(), O_RDWR | O_CREAT | O_EXCL, 0600);