Segmentation fault(LINUX) and no idea why!

Eric Lee Green eric at estinc.com
Thu Jul 6 15:25:19 EDT 2000


Thomas Thiele wrote: 
> In my program I create a new thread. In this new thread I fork and
> replace the child with an other program
> using excel. Normaly I have up to four threads with this procedure. So I
> have a number of threads and the same numbers of childs (the called
> program)
> 
> The problem is sometimes (relativly seldom, so it's unreproducible ;-( )
> I get a segmantation fault and the pytthon interpreter stops.

I haven't had good luck with forking a multi-threaded Python program, unless I
immediately follow the fork() with an exec(). I suspect it's something to do
with the internal state that Python uses as part of the thread stuff, but
haven't cared enough to track it down (I dumped the whole 'threads' stuff
instead, because I have found no way of telling whether a thread is still
running or not...). 

-- 
Eric Lee Green                         eric at estinc.com
Software Engineer                      Visit our Web page:
Enhanced Software Technologies, Inc.   http://www.estinc.com/
(602) 470-1115 voice                   (602) 470-1116 fax



More information about the Python-list mailing list