Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: os.system and subprocess odd behavior

Reply
Thread Tools

Re: os.system and subprocess odd behavior

 
 
Cameron Simpson
Guest
Posts: n/a
 
      12-18-2012
On 18Dec2012 05:39, Dave Angel <(E-Mail Removed)> wrote:
| On 12/18/2012 05:27 AM, Hans Mulder wrote:
| > On 18/12/12 06:10:43, http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
| >> I hope I understand the question... but shouldn't you wait for the process to complete before exiting?
| >>
| >> Something like:
| >>
| >> pid = subprocess.Popen(...)
| >> pid.wait()
| >>
| >> Otherwise, it'll exit before the background process is done.
| > Why would that be a problem?
|
| Because you don't want to bog the system down with a zombie task.

A zombie task is just a process table slot; it costs the system almost
nothing. It is untidy but except in extreme cases, not a performance or
resource issue.

OTOH, a child process that is still active (pointlessly) might be a
problem...
--
Cameron Simpson <(E-Mail Removed)>

My initial work-around is to rebuild history.
- (E-Mail Removed) (Gary Heston)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
os.system and subprocess odd behavior py_genetic Python 19 12-18-2012 10:46 PM
Very odd output from subprocess m Python 3 07-05-2010 10:01 PM
how to import subprocess into my 'subprocess.py' file hiral Python 2 05-05-2010 12:56 PM
Odd behavior with odd code Michael Speer C Programming 33 02-18-2007 07:31 AM
[Subprocess/Windows] subprocess module under Windows 98 Andreas Jung Python 2 11-02-2005 05:41 PM



Advertisments