(main): use sigaction without SA_RESTART to break out of select when a
signal arrives git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3418 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
12
kdc/main.c
12
kdc/main.c
@@ -71,7 +71,19 @@ main(int argc, char **argv)
|
||||
}else
|
||||
kdc_log(5, "Database is not encrypted");
|
||||
|
||||
#ifdef HAVE_SIGACTION
|
||||
{
|
||||
struct sigaction sa;
|
||||
|
||||
sa.sa_flags = 0;
|
||||
sa.sa_handler = sigterm;
|
||||
sigemptyset(&sa.sa_mask);
|
||||
|
||||
sigaction(SIGINT, &sa, NULL);
|
||||
}
|
||||
#else
|
||||
signal(SIGINT, sigterm);
|
||||
#endif
|
||||
loop();
|
||||
krb5_free_context(context);
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user