From abb968c6cdc50023b248b328a403444e644619bc Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Fri, 21 Nov 2008 16:23:11 +0000 Subject: Update tools to latest version of tp-glib and include a gitignore svn path=/trunk/; revision=1883 --- tools/with-session-bus.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'tools/with-session-bus.sh') diff --git a/tools/with-session-bus.sh b/tools/with-session-bus.sh index 26d9f248a..519b9b1c8 100644 --- a/tools/with-session-bus.sh +++ b/tools/with-session-bus.sh @@ -4,7 +4,7 @@ # The canonical location of this program is the telepathy-glib tools/ # directory, please synchronize any changes with that copy. # -# Copyright (C) 2007 Collabora Ltd. +# Copyright (C) 2007-2008 Collabora Ltd. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright @@ -20,6 +20,10 @@ usage () { echo "usage: $me [options] -- program [program_options]" >&2 echo "Requires write access to the current directory." >&2 + echo "" >&2 + echo "If \$WITH_SESSION_BUS_FORK_DBUS_MONITOR is set, fork dbus-monitor" >&2 + echo "with the arguments in \$WITH_SESSION_BUS_FORK_DBUS_MONITOR_OPT." >&2 + echo "The output of dbus-monitor is saved in $me-.dbus-monitor-logs" >&2 exit 2 } @@ -65,6 +69,13 @@ dbus-daemon $dbus_daemon_args e=0 DBUS_SESSION_BUS_ADDRESS="`cat $me-$$.address`" export DBUS_SESSION_BUS_ADDRESS + +if [ -n "$WITH_SESSION_BUS_FORK_DBUS_MONITOR" ] ; then + echo -n "Forking dbus-monitor $WITH_SESSION_BUS_FORK_DBUS_MONITOR_OPT" >&2 + dbus-monitor $WITH_SESSION_BUS_FORK_DBUS_MONITOR_OPT \ + &> $me-$$.dbus-monitor-logs & +fi + "$@" || e=$? trap - INT HUP TERM -- cgit v1.2.3