summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2010-10-29 11:16:03 +0200
committerHans de Goede <hdegoede@redhat.com>2010-10-29 11:16:03 +0200
commit12e838d4303210f6bc1312b12390af8c2eb31779 (patch)
tree29eea0240bdffbb4fa41d7ecc5a5c1e9afdc0522
parentee3aef31bfb3848f584b1839a19517efb1216dab (diff)
vdagentd: connect to console kit after daemonize
Otherwise GetSessionForUnixProcess will not work.
-rw-r--r--vdagentd.c6
1 files 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)