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

2020-12-01 Thread Irit Katriel
Irit Katriel added the comment: Fixed in 3.4, won't be fixed in 2.7. -- nosy: +iritkatriel resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

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

2013-11-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1b5506fc6a50 by Richard Oudkerk in branch 'default': Issue #19478: Make choice of semaphore prefix more flexible. http://hg.python.org/cpython/rev/1b5506fc6a50 -- nosy: +python-dev ___ Python tracker

[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 of the

[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 rep...@bugs.python.org http://bugs.python.org/issue19478 ___ ___ Python-bugs-list mailing list

[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++); } else { PyOS_snprintf(buffer,

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

2013-11-01 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +ned.deily, ronaldoussoren ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19478 ___ ___

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

2013-11-01 Thread Ned Deily
Ned Deily added the comment: I don't have any experience using OS X sandboxing yet but I wonder whether there are other instances of semaphores or other resources used elsewhere in the standard library that would benefit from a common solution. --

[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 environment (mostly

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

2013-11-01 Thread Richard Oudkerk
Richard Oudkerk added the comment: Although it is undocumented, in python 3.4 you can control the prefix used by doing multiprocessing.current_process()._config['semprefix'] = 'myprefix' in the main process at the beginning of the program. Unfortunately, this will make the full prefix

[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. --