Debugging segmentation faults
George Sakkis
george.sakkis at gmail.com
Wed Mar 7 23:12:14 EST 2007
On Mar 7, 4:15 pm, John Nagle <n... at animats.com> wrote:
> You're using Python on a web server to do something
> complicated. You must suffer.
>
> Are you trying to fork off a subprocess in a multithreaded
> program? That's unlikely to work. The sematics differ
> from OS to OS (Solaris forks all the threads, most other
> operating systems don't; most UNIX-based OSs copy all the
> open file descriptors, but some give you control of which
> open files are passed), and Python may not be thread-safe
> in that area.
I see the potential problem in general, but in my case every thread is
exclusively responsible for the subprocesses it forks; no subprocess
is inherited from the main thread or is shared in among the worker
threads.
George
More information about the Python-list
mailing list