[issue19478] Add ability to prefix posix semaphore names created by multiprocessing module

2013-11-01 Thread Marc Liyanage
Marc Liyanage added the comment: Great to hear that this is mostly supported in 3.4. I would definitely like to see the small change added that lets me insert a string before the leading slash. It would also be helpful to have it in Python 2.7 as well

[issue19478] Add ability to prefix posix semaphore names created by multiprocessing module

2013-11-01 Thread Marc Liyanage
Marc Liyanage added the comment: >From the description above, I would guess shared memory names as well, but I >don't know which parts of the Python library use those, if any. In general, it's easy to adjust the Python code to deal with the restriction of the sandboxed env

[issue19478] Add ability to prefix posix semaphore names created by multiprocessing module

2013-11-01 Thread Marc Liyanage
Marc Liyanage added the comment: I'm thinking something along the lines of char *env = Py_GETENV("PYTHONSEMAPHOREPREFIX"); if (env && *env != '\0') { PyOS_snprintf(buffer, sizeof(buffer), "%s/mp%ld-%d", env, (long)getpid(), counter++)

[issue19478] Add ability to prefix posix semaphore names created by multiprocessing module

2013-11-01 Thread Marc Liyanage
Marc Liyanage added the comment: "leasing" -> "leading" -- ___ Python tracker <http://bugs.python.org/issue19478> ___ ___ Python-bugs-

[issue19478] Add ability to prefix posix semaphore names created by multiprocessing module

2013-11-01 Thread Marc Liyanage
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 o