Pascal Chambon, 29.01.2010 22:58: > I've just recently realized the huge problems surrounding the mix of > multithreading and fork() - i.e that only the main thread actually > survived the fork(), and that process data (in particular, > synchronization primitives) could be left in a dangerously broken state > because of such forks, if multithreaded programs.
I would *never* have even tried that, but it doesn't surprise me that it works basically as expected. I found this as a quick intro: http://unix.derkeiler.com/Newsgroups/comp.unix.programmer/2003-09/0672.html That post suggests that the behaviour you describe is somewhat platform specific, which was to be expected as well. I liked this quote, attributed to David Butenhof: """ it is not polite to say to a thread: fork you! """ FWIW, I'm against getting "rid of fork() whenever wanted", that would just make things a lot more complex than necessary all over the place. But please consider providing a doc patch to the bug tracker that mentions the potential issues when people try that. (OTOH, most people won't try, so it might be better not to spread bad ideas.) Stefan _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com