From f0b41f3fb7c8802cfbd1576e10f268e20d5e1e7b Mon Sep 17 00:00:00 2001 From: Jesse Andrews Date: Mon, 7 Nov 2011 09:51:15 -0800 Subject: [PATCH] update for why we sleep --- stack.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stack.sh b/stack.sh index 33eb207..ca8ab41 100755 --- a/stack.sh +++ b/stack.sh @@ -908,7 +908,10 @@ function screen_it { NL=`echo -ne '\015'` if [[ "$ENABLED_SERVICES" =~ "$1" ]]; then screen -S stack -X screen -t $1 - sleep 0.5 + # sleep to allow bash to be ready to be send the command - we are + # creating a new window in screen and then sends characters, so if + # bash isn't running by the time we send the command, nothing happens + sleep 1 screen -S stack -p $1 -X stuff "$2$NL" fi }