ctdb-build: Move internal include files in a separate directory
[samba.git] / selftest / in_screen
index 8bfbc0101b0c783020a5b213304bc4a76dbe52bd..5468a216e310fb7c2c2cc27804f97252fac37486 100755 (executable)
@@ -69,7 +69,11 @@ cleanup() {
 rm -f $basedir/$SERVERNAME.status $basedir/$SERVERNAME.log
 echo $$ > $basedir/$SERVERNAME.parent.pid
 trap cleanup SIGINT SIGTERM SIGPIPE
 rm -f $basedir/$SERVERNAME.status $basedir/$SERVERNAME.log
 echo $$ > $basedir/$SERVERNAME.parent.pid
 trap cleanup SIGINT SIGTERM SIGPIPE
-screen -r -X screen -t test:$SERVERNAME bash $basedir/$SERVERNAME.launch
+if [[ "$TMUX" ]]; then
+    tmux new-window -n test:$SERVERNAME "bash $basedir/$SERVERNAME.launch"
+else
+    screen -r -X screen -t test:$SERVERNAME bash $basedir/$SERVERNAME.launch
+fi
 echo "$(date) waiting in $$" >> $basedir/$SERVERNAME.log
 read stdin_var
 echo "$(date) EOF on stdin" >> $basedir/$SERVERNAME.log
 echo "$(date) waiting in $$" >> $basedir/$SERVERNAME.log
 read stdin_var
 echo "$(date) EOF on stdin" >> $basedir/$SERVERNAME.log