summaryrefslogtreecommitdiffstats
path: root/Lib/multiprocessing/process.py
diff options
context:
space:
mode:
authorRichard Oudkerk <shibturn@gmail.com>2013-11-02 17:05:07 (GMT)
committerRichard Oudkerk <shibturn@gmail.com>2013-11-02 17:05:07 (GMT)
commite943697750a5828c0b4937ab28a301001700ad84 (patch)
tree60850ebf0c51038636087a6b3ffbaf73795c3a09 /Lib/multiprocessing/process.py
parent32dfef81a2c99d755c485ea5399d28b52d37a9e0 (diff)
downloadcpython-e943697750a5828c0b4937ab28a301001700ad84.zip
cpython-e943697750a5828c0b4937ab28a301001700ad84.tar.gz
cpython-e943697750a5828c0b4937ab28a301001700ad84.tar.bz2
Issue #19478: Make choice of semaphore prefix more flexible.
Diffstat (limited to 'Lib/multiprocessing/process.py')
-rw-r--r--Lib/multiprocessing/process.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/Lib/multiprocessing/process.py b/Lib/multiprocessing/process.py
index c2fc581..cd52736 100644
--- a/Lib/multiprocessing/process.py
+++ b/Lib/multiprocessing/process.py
@@ -301,10 +301,16 @@ class _MainProcess(BaseProcess):
self._parent_pid = None
self._popen = None
self._config = {'authkey': AuthenticationString(os.urandom(32)),
- 'semprefix': 'mp'}
+ 'semprefix': '/mp'}
# Note that some versions of FreeBSD only allow named
- # semaphores to have names of up to 14 characters. Therfore
+ # semaphores to have names of up to 14 characters. Therefore
# we choose a short prefix.
+ #
+ # On MacOSX in a sandbox it may be necessary to use a
+ # different prefix -- see #19478.
+ #
+ # Everything in self._config will be inherited by descendant
+ # processes.
_current_process = _MainProcess()