maybe detach from console?

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11296 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
2002-08-28 21:12:03 +00:00
parent d272c5c219
commit 71d5ee0ce2

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997 - 2000 Kungliga Tekniska H<>gskolan
* Copyright (c) 1997-2002 Kungliga Tekniska H<>gskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@@ -32,12 +32,19 @@
*/
#include "kdc_locl.h"
#ifdef HAVE_UTIL_H
#include <util.h>
#endif
RCSID("$Id$");
sig_atomic_t exit_flag = 0;
krb5_context context;
#ifdef HAVE_DAEMON
int no_detach = 1;
#endif
static RETSIGTYPE
sigterm(int sig)
{
@@ -95,6 +102,10 @@ main(int argc, char **argv)
#else
signal(SIGINT, sigterm);
signal(SIGTERM, sigterm);
#endif
#ifdef HAVE_DAEMON
if (!no_detach)
daemon(0, 0);
#endif
pidfile(NULL);
loop();