Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #32635
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!zen.net.uk!dedekind.zen.co.uk!reader02.nrc01.news.zen.net.uk.POSTED!not-for-mail |
|---|---|
| From | Nobody <nobody@nowhere.com> |
| Subject | Re: Avoiding defunct processes |
| Date | Fri, 02 Nov 2012 15:46:04 +0000 |
| User-Agent | Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.) |
| Message-Id | <pan.2012.11.02.15.46.04.75000@nowhere.com> |
| Newsgroups | comp.lang.python |
| References | <b8d1fb3a-20cd-4889-900a-61ec5b64f0c1@uc4g2000pbc.googlegroups.com> |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | 8bit |
| Lines | 12 |
| Organization | Zen Internet |
| NNTP-Posting-Host | 96c9b8a5.news.zen.co.uk |
| X-Trace | DXC=WH[\`]^;BSN<TPA3dKcdfJ]G;bfYi23hD=dR0\ckLKG@WeZ<[7LZNRF?6d==@T8IFONQ<`Sf8^TaO0Z\i0\^Z3WLjMF[@JSMFiF |
| X-Complaints-To | abuse@zen.co.uk |
| Xref | csiph.com comp.lang.python:32635 |
Show key headers only | View raw
On Thu, 01 Nov 2012 19:16:17 -0700, Richard wrote: > I create child processes with subprocess.Popen(). > Then I either wait for them to finish or kill them. > Either way these processes end up as defunct until the parent process > completes: > $ ps e > 6851 pts/5 Z+ 1:29 [python] <defunct> You need to either call the .wait() method, or keep calling the .poll() method until the .returncode attribute is not None.
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Avoiding defunct processes Richard <richardbp@gmail.com> - 2012-11-01 19:16 -0700 Re: Avoiding defunct processes Chris Angelico <rosuav@gmail.com> - 2012-11-02 13:36 +1100 Re: Avoiding defunct processes Nobody <nobody@nowhere.com> - 2012-11-02 15:46 +0000
csiph-web