DEFUNCT PROCESSES

DEFUNCT PROCESSES

Post by Anthony Pa » Sat, 25 Feb 1995 01:12:39



When using  'ps -aux', the application I use "series 5000" creates a bunch of <defunct> processes,
which I cannot kill. The only solution I have come up with so far is to log off, thus terminating
the defunct process. Sometimes this doesn't always work, and I have to reboot the workstation.

I've been told that a <defunct> process doesn't recognize it's parent process and cannot be killed.

Does anyone have any suggestions?

 
 
 

DEFUNCT PROCESSES

Post by gordon beat » Thu, 02 Mar 1995 00:19:57



> When using 'ps -aux', the application I use "series 5000" creates a
> bunch of <defunct> processes, which I cannot kill. The only solution
[...]
> I've been told that a <defunct> process doesn't recognize it's
> parent process and cannot be killed.

A defunct process is not a process in the normal sense - it is an
entry in the zombie list, a list of process table entries containing
accounting information and exit status for a exited processes.

So you can't kill them, because they aren't running. But they are
using up process table entries, which is not a good thing because
eventually your system will run out of them and need to be rebooted.

Quote:>Does anyone have any suggestions?

Your application is responsible for collecting the exit status etc for
all if its child processes. It can do this by calling one of the
wait(2) system calls for each child process it creates. Once this has
been done, the corresponding process table entry is removed from the
zombie list and can be reused.

/gordon

--

department of computer systems
uppsala university                            tel +46-18-183156
box 325, 751 05 uppsala, sweden               fax +46-18-550225

 
 
 

1. Defunct processes in Net Application

I have a communications program that creates a server
and then forks off children to handle connections.  The
problem I have is that once the children have finished
processing and exit, they become defunct processes
because they are waiting to report their status to the
parent.

I do not want to hold up the parent process waiting for
the child to exit.  Does anyone know how to use the
"wait" command to accomplish this.  I tryed using a
non-blocking "wait3" command but the defunct children
never went away.  I also tryed registering for a
SIGCHLD signal so that I would get interrupted when
a child had status to report.  Once interrupted I
did a wait3 to get the status of the child.  The SIGCHLD
interrupt caused the accept in my parent process to
return with an error.  I tryed ignoring the SIGCHLD
during the accept and then registering for it once the
accept was complete.  This didn't work either.  
The defunct processes never died.

Does anyone know how to solve this problem.  It seems
like it should be one of those simple things that I'm just
to ignorant to know about.

Thanks for your help,
Ann Ross

2. USB keyboards work ok with Linux?

3. defunct processes ; killing

4. Question about firewall configuration

5. S10 dtgreet and defunct process

6. Changing IP address and hostname

7. HELP please! why do I get defunct process

8. How to unlock a tty?? AIX 4.3.2

9. Defunct Process on Solaris!!!!

10. Fork and Defunct Processes.

11. defunct process

12. Killing Defunct processes

13. Trouble with defunct process