{
switch (sig)
{
-#ifdef DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX
- case SIGIO:
- /* explicit fall-through */
-#endif /* DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX */
#ifdef SIGHUP
case SIGHUP:
{
" [--introspect]"
" [--address=ADDRESS]"
" [--nopidfile]"
+ " [--nofork]"
#ifdef DBUS_UNIX
" [--fork]"
- " [--nofork]"
" [--systemd-activation]"
#endif
"\n");
{
introspect ();
}
-#ifdef DBUS_UNIX
else if (strcmp (arg, "--nofork") == 0)
{
flags &= ~BUS_CONTEXT_FLAG_FORK_ALWAYS;
flags |= BUS_CONTEXT_FLAG_FORK_NEVER;
}
+#ifdef DBUS_UNIX
else if (strcmp (arg, "--fork") == 0)
{
flags &= ~BUS_CONTEXT_FLAG_FORK_NEVER;
#ifdef SIGHUP
_dbus_set_signal_handler (SIGHUP, signal_handler);
#endif
-#ifdef DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX
- _dbus_set_signal_handler (SIGIO, signal_handler);
-#endif /* DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX */
#endif /* DBUS_UNIX */
+#ifdef ENABLE_KDBUS_TRANSPORT
+ if (bus_context_get_systemd_activation(context) == TRUE)
+ {
+ if (strncmp(bus_context_get_address(context), "kdbus:", strlen("kdbus:")) == 0 &&
+ !strcmp(bus_context_get_type(context), "system") &&
+ getuid() == 0)
+ {
+ kill (1, SIGUSR1);
+ }
+ }
+#endif
+
_dbus_verbose ("We are on D-Bus...\n");
_dbus_loop_run (bus_context_get_loop (context));