popen problems

D

David McNab

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("myprog < /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
 

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,776
Messages
2,569,603
Members
45,190
Latest member
ClayE7480

Latest Threads

Top