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) |