new childhandler
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@779 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -11,6 +11,23 @@ static size_t cookie_len;
|
|||||||
|
|
||||||
#define COOKIE_TYPE "MIT-MAGIC-COOKIE-1"
|
#define COOKIE_TYPE "MIT-MAGIC-COOKIE-1"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Signal handler that justs waits for the children when they die.
|
||||||
|
*/
|
||||||
|
|
||||||
|
static RETSIGTYPE
|
||||||
|
childhandler (int sig)
|
||||||
|
{
|
||||||
|
pid_t pid;
|
||||||
|
int status;
|
||||||
|
|
||||||
|
do {
|
||||||
|
pid = waitpid (-1, &status, WNOHANG|WUNTRACED);
|
||||||
|
} while(pid > 0);
|
||||||
|
signal (SIGCHLD, childhandler);
|
||||||
|
SIGRETURN(0);
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
fatal (int fd, char *s)
|
fatal (int fd, char *s)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user