vdagentd: work around GLib's fork issues
Creating threads is not compatible with forking as only the thread
that calls fork() is inherited.
Handlers registered with g_unix_signal_add() create a thread so
move these calls after fork.
Also call g_socket_service_start() after fork to avoid creation of
new threads before it is necessary.
Fixes: https://gitlab.freedesktop.org/spice/linux/vd_agent/issues/18
Also see: https://gitlab.gnome.org/GNOME/glib/issues/2073
Signed-off-by: Jakub Janků <jjanku@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
(cherry picked from commit 9b8c0ebb9fb573e6ce3c5416371509f416503d0c)
patch_name: 0001-vdagentd-work-around-GLib-s-fork-issues.patch
present_in_specfile: true
location_in_specfile: 1
squash_commits: true