Tornado doesn't restart cleanly in supervisor
问题 I'm using tornado to run a flask app, and I have a shell script which does a little work and then runs the app. #!/usr/bin/env bash some_work more_work python /usr/share/theapp/theapp.py I use supervisor to manage this little script. Starting up works fine ( sudo supervisorctl start theapp.sh ), but when I want to restart, the python subprocess doesn't exit and hangs around, occupying the port and preventing startup again. I've tried adding traps to ensure that the python code really is