From f073826f58541cbbe2b805f200a9d245d76c634c Mon Sep 17 00:00:00 2001 From: William Jon McCann Date: Tue, 3 Apr 2007 12:25:18 -0400 Subject: daemonize a little earlier --- src/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/main.c b/src/main.c index fe2e9ec..90856db 100644 --- a/src/main.c +++ b/src/main.c @@ -288,6 +288,10 @@ main (int argc, g_option_context_parse (context, &argc, &argv, NULL); g_option_context_free (context); + if (! no_daemon && daemon (0, 0)) { + g_error ("Could not daemonize: %s", g_strerror (errno)); + } + setup_debug_log (debug); connection = get_system_bus (); @@ -308,10 +312,6 @@ main (int argc, g_debug ("initializing console-kit-daemon %s", VERSION); - if (! no_daemon && daemon (0, 0)) { - g_error ("Could not daemonize: %s", g_strerror (errno)); - } - /* remove old pid file */ unlink (CONSOLE_KIT_PID_FILE); -- cgit