thread hangs when using subprocess only in specific circumstances
Donn Cave
donn at u.washington.edu
Mon Jan 9 19:54:42 EST 2006
In article <qgt5s154jgqa9dc5fb41vp717ghpmd8fdr at 4ax.com>,
Dennis Lee Bieber <wlfraed at ix.netcom.com> wrote:
> On Mon, 09 Jan 2006 22:59:45 +0100, Toon Verstraelen
> <Toon.Verstraelen at UGent.be> declaimed the following in comp.lang.python:
>
> > --- main.py ---
> >
> > import my_thread
> >
> Are you sure it is hanging? I'd expect this to do the import
> (starting the thread in the import context) and then to immediately exit
> since there is no code in the main thread to wait for anything.
But this would also be true when he runs the module directly,
right?
I don't know about that, but when I run it via import, instead
of hanging on NetBSD 2.0 it crashes, and you get the file and
line number of the pthread function where it died. Shortly
after doing a yield that's apparently expected to always work.
If not via import, no problem. If not subprocess, no problem
(I can use os.popen, or os.pipe/fork/execve, etc.) I imagine
this is related to the problem on Linux.
Donn Cave, donn at u.washington.edu
More information about the Python-list
mailing list