Search the web
Sign In
New User? Sign Up
python-list · Python List
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
popen problems   Message List  
Reply | Forward Message #106120 of 122067 |
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

--
http://mail.python.org/mailman/listinfo/python-list



Thu Aug 21, 2003 4:08 am

postmaster@...
Send Email Send Email

Forward
Message #106120 of 122067 |
Expand Messages Author Sort by Date

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...
David McNab
postmaster@...
Send Email
Aug 21, 2003
4:17 am

... I noticed that the popen2.Popen3 class only waits for (reaps) children on subsequent runs. I.E. there is always one hanging around. ... hrm, never noticed...
P@...
Send Email
Aug 21, 2003
9:50 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help