diff options
author | Hans de Goede <hdegoede@redhat.com> | 2010-10-29 11:16:03 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2010-10-29 11:16:03 +0200 |
commit | 12e838d4303210f6bc1312b12390af8c2eb31779 (patch) | |
tree | 29eea0240bdffbb4fa41d7ecc5a5c1e9afdc0522 | |
parent | ee3aef31bfb3848f584b1839a19517efb1216dab (diff) |
vdagentd: connect to console kit after daemonize
Otherwise GetSessionForUnixProcess will not work.
-rw-r--r-- | vdagentd.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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) |