From 9717c710aa0ff35b7f7d0da521b6abd8d50257ad Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Mon, 27 Apr 2015 11:37:48 +0200 Subject: Fix tail killed error --- .gitignore | 1 + competition.py | 1 - fullcompMT.sh | 4 ++-- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 321bcea..619517f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ competitions/ playerlogs/ gamevisuals/ +competitionstubs/ gluon neutrino diff --git a/competition.py b/competition.py index 2582288..3a21115 100755 --- a/competition.py +++ b/competition.py @@ -285,7 +285,6 @@ while True: sys.exit(1) move=parsemove(line) if move==False or not isvalid(board,player,move): - print("move =",move,"player =",player) print("P"+str(player)+" made an invalid move: '"+line+"'.") endgame=True break diff --git a/fullcompMT.sh b/fullcompMT.sh index ece635f..66604a3 100755 --- a/fullcompMT.sh +++ b/fullcompMT.sh @@ -15,10 +15,10 @@ FIFONAME=fullcompMT_output_fifo.fifo [[ -e $FIFONAME ]] && rm $FIFONAME mkfifo fullcompMT_output_fifo.fifo -tail -F $FIFONAME & +tail -F "$FIFONAME" & TAILPID=$! -trap "rm $FIFONAME; kill $TAILPID; ./fullcompstats.py" EXIT +trap "kill $TAILPID; rm $FIFONAME; ./fullcompstats.py" EXIT DATE_FMT="%Y-%m-%d %H:%M:%S" -- cgit v1.2.3-70-g09d2