Re: DEFUNCT Processes

From: Johannes (johannes.gross_at_gmx.net)
Date: 08/25/04


Date: Wed, 25 Aug 2004 07:47:12 +0200

When a child process dies the parent process gets notified with a signal
(SIGCHLD). The child process stays as DEFUNCT (also called zombie) in the
process list until the parent process deals with signal (by calling wait() or
waitpid()). If you are not interested in your dying childs set the signal
handler for SIGCHLD to IGNORE. BTW, this is UNIX not AIX.

DEFUNCTs which stay in the process list are a programing error. Identify the
parent process with ps -ef and send the programer the man pages for wait() and
waitpid() :-)

Johannes

connect wrote:
> Hi,
> I have a client running AIX 5.1 and have found a couple of defunct processes
> chewing up CPU usage.
> We have tried killing these processes which comes back stating "Then
> specified process does not exist" we have tried rebooting the machine but
> the processes are still there. Can you tell me how to get rid of these or if
> they are part of the unix kernal....
> This is a quick screen shot of ps vg | head -10
> 516 - A 16329:01 0 12 19828 xx 0 19816 24.3 0.0
> wait
> 774 - A 15528:23 0 12 19828 xx 0 19816 23.1 0.0
> wait
> 1032 - A 15743:58 0 12 19828 xx 0 19816 23.5 0.0
> wait
> 1290 - A 16005:45 0 12 19828 xx 0 19816 23.9 0.0
> wait
> # ps -ef | grep 1032
> root 124662 169142 0 09:38:05 pts/106 0:00 grep 1032
> # kill -1 1032
> kill: 1032: 0403-003 The specified process does not exist.
>
>
> Any suggestion would be much appreciated.
>
>
> Cheers
>
> Pedds : )
>
>



Relevant Pages

  • Will the waitpid() in parent process return if I dont catch the SIGCHLD signal?
    ... If I use a SIGALRM signal to stop a child process, ... function in parent process return if I don't catch the SIGCHLD? ...
    (comp.unix.solaris)
  • [HPADM] How to capture process before it became defunct?
    ... After it became defunct, I can only see the parent process. ... But what child process was it actually? ... To subscribe/unsubscribe to this list, ...
    (HP-UX-Admin)
  • Re: A tricky problem about Process.wait and popen
    ... There is a parent process and a fixed number of child processes. ... using IO.popen and then wait for any child process exits. ... it will read correspondant pipe to get result ... puts "Started" ...
    (comp.lang.ruby)
  • Re: Monitor a child process of a parent process,...
    ... how do i programmatically monitor a child process ... right when the parent process starts the child process. ... I know that i could use some sort of output redirection ...
    (microsoft.public.win32.programmer.kernel)
  • Re: fork and pipe
    ... In summary, the pipe(2) call creates a single, unidirectional pipe, ... The parent process calls pipeto open two fds. ... the parent process calls forkto spawn a child process ... the child process inherits all open fds from the parent process, ...
    (comp.unix.programmer)