tk.createfilehandler() broken with threaded tcl?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • klappnase@web.de

    #1

    tk.createfilehandler() broken with threaded tcl?

    Hello everyone,

    I am running into troubles with some of my scripts that make use of
    tk.createfileha ndler() 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.createfileha ndler() with a "manual"
    loop that reads Popen4.fromchil d() to catch the output messages and the
    problems seem to be gone, so it looks like using tk.createfileha ndler()
    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

Working...