Commit 19a6526
committed
gh-96026: do not unregister without register in shm POSIX error handling
`multiprocessing.shared_memory.SharedMemory` currently tries to unlink a POSIX
shared memory object if it fails to mmap it after opening/creating it in the
constructor. It does this by calling `cleanup()`, which unregisters the shared
memory despite it not having been registered. This will trigger a separate
exception in the resource tracker.
Fix this by calling the low-level unlink directly.1 parent 6970bd3 commit 19a6526
File tree
1 file changed
+1
-1
lines changed- Lib/multiprocessing
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| |||
0 commit comments