Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I had issued the ps -ef|grep java command and this is one of the entries that I got :

subhrcho   875   803  0 Jan23 pts/5    00:02:27 [java] <defunct>

What is <defunct> implying here ? What state is that process is that process with PID=875 in ?

share|improve this question
add comment

1 Answer 1

up vote 9 down vote accepted

From the ps manpage:

Processes marked <defunct> are dead processes (so-called "zombies") that remain because their parent has not destroyed them properly. These processes will be destroyed by init(8) if the parent process exits.

share|improve this answer
    
what is the contract between a parent process and child process for destruction of the child process ? I thought it is the duty of the child process to notify the parent that it is being destroyed ? –  Geek Jan 24 '13 at 18:02
    
@Geek The kernel destroys the child process and notifies the parent. The child only calls _exit or dies of a signal. When the kernel destroys a process, all that remains is an entry in the process table, which goes away when the parent (or process 1, for orphans) calls wait. –  Gilles Jan 24 '13 at 21:44
1  
@Giles What does it mean when the man page says parent has not destroyed properly the child process ? parent did not call wait ? –  Geek Jan 25 '13 at 4:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.