summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorWilliam Jon McCann <mccann@jhu.edu>2007-04-03 12:25:18 -0400
committerWilliam Jon McCann <mccann@jhu.edu>2007-04-03 12:25:18 -0400
commitf073826f58541cbbe2b805f200a9d245d76c634c (patch)
tree6a7d1aa60f7afee124b1b51d332acaa1371e691e /src/main.c
parent80dc652115e275a95b05bb6809825cc324d9475a (diff)
daemonize a little earlier
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c8
1 files changed, 4 insertions, 4 deletions
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);