mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-01 04:31:57 -07:00
helpers: make shm_open() portable after 8bcccf9f0f
(#6471)
https://pubs.opengroup.org/onlinepubs/9699919799/functions/shm_open.html https://man.freebsd.org/shm_open/2 https://www.man7.org/linux/man-pages/man3/shm_open.3.html
This commit is contained in:
@@ -814,7 +814,8 @@ bool envEnabled(const std::string& env) {
|
||||
}
|
||||
|
||||
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) {
|
||||
int fd = shm_open(name.c_str(), O_RDWR | O_CREAT | O_EXCL, 0600);
|
||||
|
Reference in New Issue
Block a user