Rémi Bernon (@rbernon) commented about dlls/winewayland.drv/wayland_surface.c:
+/********************************************************************** + * wayland_shmfd_create + * + * Creates a file descriptor representing an anonymous SHM region. + */ +static int wayland_shmfd_create(int size) +{ + int ret; + int fd; + char name[64]; + + do + { + snprintf(name, sizeof(name), "/winewayland-shm-%d-%d", getpid(), rand()); + fd = shm_open(name, O_CREAT | O_EXCL | O_RDWR, 0600); + } while (fd < 0 && (errno == EINTR || errno == EEXIST)); We're not using shm_open anywhere else and I have no idea how portable it is and if this is acceptable, or if there's a better way.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/2944#note_35024