Open gordon-quad opened 14 years ago
How are you noticing that? The game engine should kill the bots after a match is finished.
In other words what happens that should not happen or vice versa?
I think this is due that I running it from shell script. bot.sh containg following: python MyBot.py --log mybot.log
command: LANG=en_US java -jar tools/PlayGame.jar maps/map7.txt 2000 20 log.txt "./bot.sh" "java -jar example_bots/BullyBot.jar" >/dev/null ; sleep 1 ; ps ax|grep MyBot |grep -v grep Turn 1 [...] Turn 21 Player 1 Wins! 24025 pts/4 R 0:01 python MyBot.py --log mybot.log
Yep. When I run PlayGame with "python MyBot.py" it was killed. But I think it is a bit abnormally to continue running when parent process is killed.
What happens if you run one of the example bots through a script. Does it terminate or also continue running?
$ rm mybot.log ; LANG=en_US java -jar tools/PlayGame.jar maps/map7.txt 2000 20 log.txt "python MyBot.py --log mybot.log" "./bot2.sh" >/dev/null ; sleep 1 ; ps ax|grep BullyBot | grep -v grep Turn 1 [...] Turn 21 Player 1 Wins!
Java bot was terminated well. bot2.sh: java -jar example_bots/BullyBot.jar
Hm I'm not really sure what I can do here. AFAIK I'm not doing anything in my code that would prevent it from being killed...
Bot still running after controlling program closes stdin.