changeset 835:f0b5901bca48

Cosmetic tweaks. (Make title bar changing callable from elsewhere, make run-emulator.sh kill distccd quietly.)
author Rob Landley <rob@landley.net>
date Sun, 04 Oct 2009 21:53:36 -0500
parents 47f699f5f143
children f448815e20b0
files sources/functions.sh sources/toys/run-emulator.sh
diffstat 2 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/sources/functions.sh	Sat Oct 03 17:26:47 2009 -0500
+++ b/sources/functions.sh	Sun Oct 04 21:53:36 2009 -0500
@@ -406,6 +406,12 @@
   echo
 }
 
+function set_titlebar()
+{
+  [ -z "$NO_TITLE_BAR" ] &&
+    echo -en "\033]2;$1\007"
+}
+
 # Extract package $1, use out-of-tree build directory $2 (or $1 if no $2)
 # Use link directory $3 (or $1 if no $3)
 
@@ -461,8 +467,7 @@
   export WRAPPY_LOGPATH="$WRAPPY_LOGDIR/cmdlines.${STAGE_NAME}.$1"
 
   # Change window title bar to package now
-  [ -z "$NO_TITLE_BAR" ] &&
-    echo -en "\033]2;$ARCH_NAME $STAGE_NAME $PACKAGE\007"
+  set_titlebar "$ARCH_NAME $STAGE_NAME $PACKAGE"
 
   # Ugly bug workaround: timestamp granularity in a lot of filesystems is only
   # 1 second, so find -newer misses things installed in the same second, so we
--- a/sources/toys/run-emulator.sh	Sat Oct 03 17:26:47 2009 -0500
+++ b/sources/toys/run-emulator.sh	Sun Oct 04 21:53:36 2009 -0500
@@ -78,6 +78,9 @@
   # Cleanup afterwards: Kill child processes we started (I.E. distccd).
   trap "kill $(jobs -p)" EXIT
 
+  # When background processes die, they should do so silently.
+  disown $(jobs -p)
+
   # Prepare some environment variables for run-qemu.sh
 
   DISTCC_PATH_PREFIX=/usr/distcc: