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

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top