diff options
author | Pablo Galindo <Pablogsal@gmail.com> | 2020-03-09 13:48:01 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-09 13:48:01 (GMT) |
commit | 6012f30beff7fa8396718dfb198ccafc333c565b (patch) | |
tree | 54b0c8bbb4cc1c76ca7206edbd6133f71fc4d95c /Lib/multiprocessing/managers.py | |
parent | dccd41e29fb9e75ac53c04ed3b097f51f8f65c4e (diff) | |
download | cpython-6012f30beff7fa8396718dfb198ccafc333c565b.zip cpython-6012f30beff7fa8396718dfb198ccafc333c565b.tar.gz cpython-6012f30beff7fa8396718dfb198ccafc333c565b.tar.bz2 |
bpo-39850: Add support for abstract sockets in multiprocessing (GH-18866)
Diffstat (limited to 'Lib/multiprocessing/managers.py')
-rw-r--r-- | Lib/multiprocessing/managers.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/multiprocessing/managers.py b/Lib/multiprocessing/managers.py index 1f9c2da..1668220 100644 --- a/Lib/multiprocessing/managers.py +++ b/Lib/multiprocessing/managers.py @@ -1262,8 +1262,12 @@ if HAS_SHMEM: def __init__(self, *args, **kwargs): Server.__init__(self, *args, **kwargs) + address = self.address + # The address of Linux abstract namespaces can be bytes + if isinstance(address, bytes): + address = os.fsdecode(address) self.shared_memory_context = \ - _SharedMemoryTracker(f"shmm_{self.address}_{getpid()}") + _SharedMemoryTracker(f"shm_{address}_{getpid()}") util.debug(f"SharedMemoryServer started by pid {getpid()}") def create(self, c, typeid, /, *args, **kwargs): |