Now using SIGUSR1 to mean `exit when number of children goes down to zero'.
SIGUSR2 is `exit when number of children is equal to zero'. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@813 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
16
appl/kx/kx.c
16
appl/kx/kx.c
@@ -43,6 +43,21 @@ usr1handler (int sig)
|
||||
SIGRETURN(0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Almost the same as for SIGUSR1, except we should exit immediately
|
||||
* if there are no active children.
|
||||
*/
|
||||
|
||||
static RETSIGTYPE
|
||||
usr2handler (int sig)
|
||||
{
|
||||
donep = 1;
|
||||
if (nchild == 0)
|
||||
exit (0);
|
||||
|
||||
SIGRETURN(0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Establish authenticated connection
|
||||
*/
|
||||
@@ -398,5 +413,6 @@ main(int argc, char **argv)
|
||||
passivep = 1;
|
||||
signal (SIGCHLD, childhandler);
|
||||
signal (SIGUSR1, usr1handler);
|
||||
signal (SIGUSR2, usr2handler);
|
||||
return doit (argv[0], passivep, debugp);
|
||||
}
|
||||
|
Reference in New Issue
Block a user