From 12e838d4303210f6bc1312b12390af8c2eb31779 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Fri, 29 Oct 2010 11:16:03 +0200 Subject: vdagentd: connect to console kit after daemonize Otherwise GetSessionForUnixProcess will not work. --- vdagentd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vdagentd.c b/vdagentd.c index f100e94..f938b02 100644 --- a/vdagentd.c +++ b/vdagentd.c @@ -654,6 +654,9 @@ int main(int argc, char *argv[]) return 1; } + if (do_daemonize) + daemonize(); + console_kit = console_kit_create(logfile); if (!console_kit) { fprintf(logfile, "Fatal could not connect to console kit\n"); @@ -668,9 +671,6 @@ int main(int argc, char *argv[]) return 1; } - if (do_daemonize) - daemonize(); - main_loop(); if (agent_owns_clipboard && virtio_port) -- cgit v1.2.3