summaryrefslogtreecommitdiffstats
path: root/core/process_wrapper.sh
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2008-10-21 07:00:00 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2008-10-21 07:00:00 -0700
commitb6c1cf6de79035f58b512f4400db458c8401379a (patch)
tree68979db37c85b499bc384e4ac337ed1424baab51 /core/process_wrapper.sh
downloadbuild-b6c1cf6de79035f58b512f4400db458c8401379a.zip
build-b6c1cf6de79035f58b512f4400db458c8401379a.tar.gz
build-b6c1cf6de79035f58b512f4400db458c8401379a.tar.bz2
Initial Contribution
Diffstat (limited to 'core/process_wrapper.sh')
-rwxr-xr-xcore/process_wrapper.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/core/process_wrapper.sh b/core/process_wrapper.sh
new file mode 100755
index 0000000..9c3104e
--- /dev/null
+++ b/core/process_wrapper.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# When using a process wrapper, this is the top-level
+# command that is executed instead of the server
+# command. It starts a new xterm in which the user can
+# interact with the new process.
+#
+# Inside of the xterm is a gdb session, through which
+# the user can debug the new process.
+
+# Save away these variables, since we may loose them
+# when starting in the xterm.
+export PREV_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
+export PREV_PATH=$PATH
+
+gnome-terminal -t "Wrapper: $1" --disable-factory -x $2/process_wrapper_gdb.sh "$@"
+