[PATCH] test: use dtach(1) instead of screen(1) in emacs tests.

Subject: [PATCH] test: use dtach(1) instead of screen(1) in emacs tests.

Date: Fri, 11 Nov 2011 00:03:14 +0200

To: Jameson Graef Rollins, Notmuch Mail

Cc:

From: Tomi Ollila


dtach is lighter than screen and is not setuid/setgid program so
TMPDIR does not get reset by dynamic loader when executed.
---
 test/test-lib.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/test-lib.sh b/test/test-lib.sh
index c81c709..af723ad 100755
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -844,8 +844,8 @@ test_emacs () {
 	if [ -z "$EMACS_SERVER" ]; then
 		EMACS_SERVER="notmuch-test-suite-$$"
 		# start a detached screen session with an emacs server
-		screen -S "$EMACS_SERVER" -d -m "$TMP_DIRECTORY/run_emacs" \
-			--no-window-system \
+		TERM=xterm dtach -n "$TMP_DIRECTORY/dtach-emacs-socket-$$" \
+			"$TMP_DIRECTORY/run_emacs" --no-window-system \
 			--eval "(setq server-name \"$EMACS_SERVER\")" \
 			--eval '(server-start)' \
 			--eval "(orphan-watchdog $$)" || return
-- 
1.5.6.5


Thread: