When I press Control-C to end my running Cherry application, it keeps on
running, doesn't return me to the prompt, and I see the following message:
[04/Dec/2010:11:51:55] ENGINE Re-spawning /wwwapp/chsite.py
[04/Dec/2010:11:51:55] ENGINE Listening for SIGHUP.
[04/Dec/2010:11:51:55] ENGINE Listening for SIGTERM.
[04/Dec/2010:11:51:55] ENGINE Listening for SIGUSR1.
[04/Dec/2010:11:51:55] ENGINE Bus STARTING
[04/Dec/2010:11:51:55] ENGINE Started monitor thread '_TimeoutMonitor'.
[04/Dec/2010:11:51:55] ENGINE Started monitor thread 'Autoreloader'.
[04/Dec/2010:11:51:55] ENGINE Serving on 192.168.5.46:80
[04/Dec/2010:11:51:55] ENGINE Bus STARTED
^CTraceback (most recent call last):
File "/wwwapp/chsite.py", line 250, in <module>
line 284, in block
self.wait(states.EXITING, interval=interval, channel='main')
...the application keeps serving up webpages like it did before, and
pressing Control-C some more times has no effect (not even a
KeyboardInterrupt). I have to pkill the python process from another
console to stop the app and get my prompt back.
I haven't investigated deeply yet, but does anyone know what's happening
here, and how can I get the usual Control-C behaviour back?
BTW, this is how I basically start my webapp:
# <lots of other config stuff snipped>
"Good programming is not learned from generalities, but by seeing how
significant programs can be made clean, easy to read, easy to maintain
and modify, human-engineered, efficient, and reliable, by the application
of common sense and good programming practices. Careful study and
imitation of good programs leads to better writing."
- Kernighan and Plauger, motto of 'Software Tools'