www.nico.schottelius.org/software/cinit/browse_source/cinit-0.0.8/serv/sig_child.c
Nico Schottelius 423ba10303 import cinit from unix.schottelius.org
Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
2009-09-16 12:53:45 +02:00

22 lines
416 B
C

/*
* cinit
* (c) 2005 Nico Schottelius (nico-linux at schottelius.org)
* We are called, when a child dies. Remove it.
*/
#include <sys/types.h>
#include <sys/wait.h>
#include "cinit.h"
/***********************************************************************
* sig_child
* collect the children
*/
void sig_child(int signal)
{
do {
signal = waitpid(-1,&signal,WNOHANG);
} while( signal > 0);
}