wrap detach
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24410 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -452,7 +452,9 @@ static int version_flag;
|
|||||||
static int help_flag;
|
static int help_flag;
|
||||||
static char *keytab_str;
|
static char *keytab_str;
|
||||||
static char *port_str;
|
static char *port_str;
|
||||||
|
#ifdef SUPPORT_DETACH
|
||||||
static int detach_from_console = 0;
|
static int detach_from_console = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
static struct getargs args[] = {
|
static struct getargs args[] = {
|
||||||
{ "config-file", 'c', arg_string, &config_file },
|
{ "config-file", 'c', arg_string, &config_file },
|
||||||
@@ -463,8 +465,10 @@ static struct getargs args[] = {
|
|||||||
"time before server is considered lost", "time" },
|
"time before server is considered lost", "time" },
|
||||||
{ "port", 0, arg_string, &port_str,
|
{ "port", 0, arg_string, &port_str,
|
||||||
"port ipropd-slave will connect to", "port"},
|
"port ipropd-slave will connect to", "port"},
|
||||||
|
#ifdef SUPPORT_DETACH
|
||||||
{ "detach", 0, arg_flag, &detach_from_console,
|
{ "detach", 0, arg_flag, &detach_from_console,
|
||||||
"detach from console" },
|
"detach from console" },
|
||||||
|
#endif
|
||||||
{ "hostname", 0, arg_string, &slave_str,
|
{ "hostname", 0, arg_string, &slave_str,
|
||||||
"hostname of slave (if not same as hostname)", "hostname" },
|
"hostname of slave (if not same as hostname)", "hostname" },
|
||||||
{ "version", 0, arg_flag, &version_flag },
|
{ "version", 0, arg_flag, &version_flag },
|
||||||
@@ -543,8 +547,10 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
master = argv[0];
|
master = argv[0];
|
||||||
|
|
||||||
|
#ifdef SUPPORT_DETACH
|
||||||
if (detach_from_console)
|
if (detach_from_console)
|
||||||
daemon(0, 0);
|
daemon(0, 0);
|
||||||
|
#endif
|
||||||
pidfile (NULL);
|
pidfile (NULL);
|
||||||
krb5_openlog (context, "ipropd-slave", &log_facility);
|
krb5_openlog (context, "ipropd-slave", &log_facility);
|
||||||
krb5_set_warn_dest(context, log_facility);
|
krb5_set_warn_dest(context, log_facility);
|
||||||
|
Reference in New Issue
Block a user