App Leaving 'sh <defunct>' Everywhere

Michael Bentley michael at jedimindworks.com
Fri May 18 07:10:46 EDT 2007


On May 18, 2007, at 3:49 AM, Robert Rawlins - Think Blue wrote:

> I’ve got an application that seems to leave ‘sh <defunct>’ in my os  
> processes list. I’m running it on Debian, albeit a stripped down  
> embedded version. I’m not sure what the cause of this is, My  
> application starts several threads and also uses popen2.popen3() to  
> run a few CMD commands.
>
> Any ideas why I’m getting this, or if it’s even something to be  
> concerned about.
These processes have completed execution, but their parents have not  
read their exit status so they still have entries in the process  
table.  They'll more than likely be reaped when the parent process  
goes away.  If you'd rather not have zombies roaming around your  
system, use wait() to read the child's exit status.

If, after the parent process exits, these processes persist -- run  
'init -q' to get rid of them.

hth,
Michael

---
"I would rather use Java than Perl. And I'd rather be eaten by a  
crocodile than use Java." — Trouser


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070518/204f91b0/attachment.html>


More information about the Python-list mailing list