wrap detach
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24413 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -36,11 +36,11 @@
|
|||||||
#include <util.h>
|
#include <util.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
RCSID("$Id$");
|
|
||||||
|
|
||||||
sig_atomic_t exit_flag = 0;
|
sig_atomic_t exit_flag = 0;
|
||||||
|
|
||||||
|
#ifdef SUPPORT_DETACH
|
||||||
int detach_from_console = -1;
|
int detach_from_console = -1;
|
||||||
|
#endif
|
||||||
|
|
||||||
static RETSIGTYPE
|
static RETSIGTYPE
|
||||||
sigterm(int sig)
|
sigterm(int sig)
|
||||||
@@ -90,8 +90,10 @@ main(int argc, char **argv)
|
|||||||
signal(SIGXCPU, sigterm);
|
signal(SIGXCPU, sigterm);
|
||||||
signal(SIGPIPE, SIG_IGN);
|
signal(SIGPIPE, SIG_IGN);
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef SUPPORT_DETACH
|
||||||
if (detach_from_console)
|
if (detach_from_console)
|
||||||
daemon(0, 0);
|
daemon(0, 0);
|
||||||
|
#endif
|
||||||
pidfile(NULL);
|
pidfile(NULL);
|
||||||
loop(context, config);
|
loop(context, config);
|
||||||
krb5_free_context(context);
|
krb5_free_context(context);
|
||||||
|
Reference in New Issue
Block a user