tk.createfilehandler() broken with threaded tcl?

K

klappnase

Hello everyone,

I am running into troubles with some of my scripts that make use of
tk.createfilehandler() to catch the output messages of subprocesses I
started with popen2.Popen4() (debian linux, python-2.3.5, tk-8.4.9).
Sometimes when those background processes are running it happens that
the gui freezes and the processlist shows the subprocess in zombie
state.
I've been using the same scripts without problems on mandrake (with
several versions of python and tk), so I came to think the problem may
be the debian build of python / tk. Now I found that on debian (unlike
mandrake) tcl/tk is build with --enable-threads, so I thought this
*might* be the cause for the problems.
I tried and replaced the call to tk.createfilehandler() with a "manual"
loop that reads Popen4.fromchild() to catch the output messages and the
problems seem to be gone, so it looks like using tk.createfilehandler()
with threaded tk is the problem.
Does anyone have an idea if this makes sense or am I on the wrong
track?

Best regards

Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,480
Members
44,900
Latest member
Nell636132

Latest Threads

Top