defunct process!!

how can i assure that daemon process which is being run as init child,can be removed immediately from system when it goes defunct or to avoid daemon process becoming defunt?

init does not let its child processes become defunct or zombie. In fact if a process ends without completely handling all of its completed child processes, init will adopt these and handle the 'wait'ing for those processes.

So you do not have to worry about init's children becoming zombies.

I've always been a little unclear on this... if init always inherits abandoned children, why do zombies still happen from sloppy programming?

Zombies are not abandoned, just ignored. They become abandoned when the parent dies. So you can kill the parent, and init will inherit them at that point.

I think he wants to know how to create a zombie... or maybe if he needs to worry about them.

See Marc Rochkind's dicussion here:
http://www.codecomments.com/archive286-2004-4-163842.html

Creating defunct processes is easy: fork like hell and go to sleep!
Very simple code for creating zombies

#include<unistd.h>
#include<stdio.h>

int main() {
   int i,pid;

   for(i=0;i<10;i++) {
      if((pid=fork())==-1){
         fprintf(stdout,"Error! Could not fork!");
         exit(-1);
      }
      if(pid==0) /* chid process */
         exit(0); /* exit immdiately and become a zombie!*/
   }
   sleep(50);  /*as parent, sleep for 50 sec to let everyone see the zombies*/
}