Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

reap zombie process in c

void delete_zombies(void)
{
    pid_t kidpid;
    int status;

    printf("Inside zombie deleter:  ");
    while ((kidpid = waitpid(-1, &status, WNOHANG)) > 0)
    {
         printf("Child %ld terminated
", kidpid);
    }
    siglongjmp(env,1);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #reap #zombie #process
ADD COMMENT
Topic
Name
4+7 =