new childhandler

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@779 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1996-09-28 21:43:07 +00:00
parent 785ad8784f
commit 4b990eff03

View File

@@ -11,6 +11,23 @@ static size_t cookie_len;
#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
fatal (int fd, char *s)
{