[issue7242] Forking in a thread raises RuntimeError

Zsolt Cserna report at bugs.python.org
Mon Jan 25 14:32:42 CET 2010


Zsolt Cserna <zsolt.cserna at morganstanley.com> added the comment:

I compile it with -lpthread.
os.fork1() was not available by default, I enabled it by removing two lines from posixmodule.c (it seems it's only enabled when #if defined(__USLC__) && defined(__SCO_VERSION__) is true).

With os.fork1() I have the same results, RuntimeError.

I was not able to compile it without pthread because I haven't found any configure options for that. If it's possible I'm happy to try it.

In my patch I wanted to reduce the effect on systems where forking in thread is working (eg. linux), that's the reason why I added "(defined (__SVR4) && defined (__sun)". But it just checks for solaris, not the OS version (on solaris 10/intel my demo is working).

(btw forking in thread  actually happens in a unittest related to BaseHTTPServer, which obviously fails on my platform)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7242>
_______________________________________


More information about the Python-bugs-list mailing list