popen problems

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David McNab

    popen problems

    Hi,

    When using os.popen, or popen2.Popen3 objects, I see a situation when
    the child process sometimes doesn't get terminated, even when the child
    program has exited.

    It's like Python (2.2.3) intermittently leaves the process dangling.
    Sometimes 'killall python' doesn't clean up these dead tasks.

    The only solution I've found has been to write a temporary input file,
    call os.system("mypr og < /tmp/infile > /tmp/outfile"), read the outfile,
    then delete the temporary in/out files.

    The child program in my case is filter programs in SpamBayes, which I've
    always observed as terminating properly.

    Any ideas?

    Cheers
    David

Working...