kevinhughes27 / TensorKart

self-driving MarioKart with TensorFlow
MIT License
1.58k stars 256 forks source link

ctrl-c doesn't stop play.py #23

Closed kevinhughes27 closed 7 years ago

kevinhughes27 commented 7 years ago

I always have to use ctrl z to put it in the background and use kill -9 _pid_. I am wondering if this is related to the code or my system (I was messing with a bunch of things when I wrote this to try and dpo fake joysticks).

@bzier @snawara does this happen to either of you?

bzier commented 7 years ago

Yeah, I have been using ctrl \ which kills python in a less-than-graceful way. I haven't taken the time to figure it out yet either. Will submit a PR if I do.

bzier commented 7 years ago

Oops I forgot, I actually did look into this. I think it is because of the HTTPServer.server_forever() call. I put it on a background thread and then just did a raw_input() call to wait for ENTER to be pressed. That worked reasonably well.