From 3935b4ed34d93de7282902e9eb8a1b84e17e660d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Sun, 25 Jan 2009 00:39:36 +0000 Subject: [PATCH] wrap detach git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24410 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/kadm5/ipropd_slave.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/kadm5/ipropd_slave.c b/lib/kadm5/ipropd_slave.c index cb294bb4c..b718f73df 100644 --- a/lib/kadm5/ipropd_slave.c +++ b/lib/kadm5/ipropd_slave.c @@ -452,7 +452,9 @@ static int version_flag; static int help_flag; static char *keytab_str; static char *port_str; +#ifdef SUPPORT_DETACH static int detach_from_console = 0; +#endif static struct getargs args[] = { { "config-file", 'c', arg_string, &config_file }, @@ -463,8 +465,10 @@ static struct getargs args[] = { "time before server is considered lost", "time" }, { "port", 0, arg_string, &port_str, "port ipropd-slave will connect to", "port"}, +#ifdef SUPPORT_DETACH { "detach", 0, arg_flag, &detach_from_console, "detach from console" }, +#endif { "hostname", 0, arg_string, &slave_str, "hostname of slave (if not same as hostname)", "hostname" }, { "version", 0, arg_flag, &version_flag }, @@ -543,8 +547,10 @@ main(int argc, char **argv) master = argv[0]; +#ifdef SUPPORT_DETACH if (detach_from_console) daemon(0, 0); +#endif pidfile (NULL); krb5_openlog (context, "ipropd-slave", &log_facility); krb5_set_warn_dest(context, log_facility);