Pass mode when opening existing shm buffer

This commit is contained in:
Kovid Goyal 2022-03-21 16:12:26 +05:30
parent f6cbca1aeb
commit ba401c19c2
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -76,7 +76,7 @@ class SharedMemory:
if tries <= 0:
raise OSError(f'Failed to create a uniquely named SHM file, try shortening the prefix from: {prefix}')
if self._fd < 0:
self._fd = shm_open(name, flags)
self._fd = shm_open(name, flags, mode)
self._name = name
try:
if flags & os.O_CREAT and size: