summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2016-08-28 15:12:16 +0100
committerSimon McVittie <smcv@debian.org>2016-08-28 15:12:16 +0100
commit0e641b27a1e6ea7063a338e00a3de6ed38e3b1d9 (patch)
treeca5b723a558ff2a1ddf24312ce34c5a109e760aa /tools
parent97234e4e95b181747b8f0e7b415c565f4bef6fee (diff)
downloaddbus-glib-0e641b27a1e6ea7063a338e00a3de6ed38e3b1d9.tar.gz
run-with-tmp-session-bus.sh: use dbus-run-session
Signed-off-by: Simon McVittie <smcv@debian.org>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/run-with-tmp-session-bus.sh24
1 files changed, 3 insertions, 21 deletions
diff --git a/tools/run-with-tmp-session-bus.sh b/tools/run-with-tmp-session-bus.sh
index cc48c44..594cb30 100755
--- a/tools/run-with-tmp-session-bus.sh
+++ b/tools/run-with-tmp-session-bus.sh
@@ -45,25 +45,7 @@ export PATH
unset DBUS_SESSION_BUS_ADDRESS
unset DBUS_SESSION_BUS_PID
-echo "Running dbus-launch --sh-syntax --config-file=$CONFIG_FILE" >&2
-
-eval `dbus-launch --sh-syntax --config-file=$CONFIG_FILE`
-
-if test -z "$DBUS_SESSION_BUS_PID" ; then
- die "Failed to launch message bus for introspection generation to run"
-fi
-
-echo "Started bus pid $DBUS_SESSION_BUS_PID at $DBUS_SESSION_BUS_ADDRESS" >&2
-
# Execute wrapped script
-echo "Running $WRAPPED_SCRIPT $@" >&2
-$WRAPPED_SCRIPT "$@" || die "script \"$WRAPPED_SCRIPT\" failed"
-
-kill -TERM $DBUS_SESSION_BUS_PID || die "Message bus vanished! should not have happened" && echo "Killed daemon $DBUS_SESSION_BUS_PID" >&2
-
-sleep 2
-
-## be sure it really died
-kill -9 $DBUS_SESSION_BUS_PID > /dev/null 2>&1 || true
-
-exit 0
+echo "Running dbus-run-session --config-file=$CONFIG_FILE -- $WRAPPED_SCRIPT $@" >&2
+dbus-run-session --config-file="$CONFIG_FILE" -- $WRAPPED_SCRIPT "$@"
+exit $?