[Python-ideas] An error in multiprocessing on MacOSX?
Gregory P. Smith
greg at krypto.org
Wed Nov 21 21:57:22 CET 2012
On Wed, Nov 21, 2012 at 12:49 PM, Ronald Oussoren <ronaldoussoren at mac.com>wrote:
> On 21 Nov, 2012, at 16:12, Sturla Molden <sturla at molden.no> wrote:
> > And what about Python itself? Is there any non-POSIX code in the
> interpreter? If it is, os.fork should be removed on Mac.
> Not necessarily in the interpeter itself, but the proxy-detection code in
> _scproxy uses non-POSIX code for detecting
> the user's proxy settings.
well, it depends. its not right to ask for "non-posix code" as the
restrictions of what you can use after a fork() are related to what you've
done before the fork (as someone else stated). if your process has spawned
threads, the entire python interpreter is unsafe to use after a fork() as
posix requires that a limited subset of safe functions are all that is used
from then on...
> BTW. removing os.fork is overkill, some system APIs don't work properly on
> OSX after fork and complain loudly when
> you try to use them. So don't do that.
> Python-ideas mailing list
> Python-ideas at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas