New submission from Marc Liyanage: I'm running Python 2.7 in a sandboxed OS X app. There are restrictions on the naming of POSIX semaphores when running in the sandbox. Specifically, there is a mandatory prefix.
I would like the ability to inject this prefix into the part of the multiprocessing module that creates the semaphore, perhaps by way of an environment variable. I see that this is how the module generates the semaphore name: PyOS_snprintf(buffer, sizeof(buffer), "/mp%ld-%d", (long)getpid(), counter++); Apple's documentation about the restrictions are here: https://developer.apple.com/library/mac/documentation/security/conceptual/AppSandboxDesignGuide/AppSandboxInDepth/AppSandboxInDepth.html#//apple_ref/doc/uid/TP40011183-CH3-SW24 The relevant part: "POSIX semaphores and shared memory names must begin with the application group identifier, followed by a slash (/), followed by a name of your choosing." So if I could inject that string before the leasing slash, I could make this work. ---------- components: Extension Modules messages: 201936 nosy: Marc.Liyanage, jnoller, sbt priority: normal severity: normal status: open title: Add ability to prefix posix semaphore names created by multiprocessing module type: enhancement versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19478> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com