summaryrefslogtreecommitdiffstats
path: root/tools/dbus-launch.c
diff options
context:
space:
mode:
authorJohn (J5) Palmieri <johnp@redhat.com>2006-08-08 21:30:31 +0000
committerJohn (J5) Palmieri <johnp@redhat.com>2006-08-08 21:30:31 +0000
commitaaa432b0644199418eb2ce506c87397cd379df4f (patch)
treeab3c01fd243dbf8c74134160a7737d50cc1f1402 /tools/dbus-launch.c
parentd33564292f0cb45c42454514797c6da1fc1de178 (diff)
* configure.in:
* tools/Makefile.am: * tools/dbus-launch.c: * bus/Makefile.am: allow --with-dbus-daemondir switch to be used to make the daemon install to a seperate bindir like /usr/libexec (patch from Brian Cameron <brian dot cameron at sun dot com)
Diffstat (limited to 'tools/dbus-launch.c')
-rw-r--r--tools/dbus-launch.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/dbus-launch.c b/tools/dbus-launch.c
index 757e833e..3004099c 100644
--- a/tools/dbus-launch.c
+++ b/tools/dbus-launch.c
@@ -771,6 +771,25 @@ main (int argc, char **argv)
verbose ("Calling exec()\n");
+ execl (DBUS_DAEMONDIR"/dbus-daemon",
+ DBUS_DAEMONDIR"/dbus-daemon",
+ "--fork",
+ "--print-pid", write_pid_fd_as_string,
+ "--print-address", write_address_fd_as_string,
+ config_file ? "--config-file" : "--session",
+ config_file, /* has to be last in this varargs list */
+ NULL);
+
+ fprintf (stderr,
+ "Failed to execute message bus daemon %s: %s. Will try again without full path.\n",
+ DBUS_DAEMONDIR"/dbus-daemon", strerror (errno));
+
+ /*
+ * If it failed, try running without full PATH. Note this is needed
+ * because the build process builds the run-with-tmp-session-bus.conf
+ * file and the dbus-daemon will not be in the install location during
+ * build time.
+ */
execlp ("dbus-daemon",
"dbus-daemon",
"--fork",