CherryPy hangs after Control-C

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

CherryPy hangs after Control-C

Michiel Overtoom


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/
[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
[04/Dec/2010:11:51:55] ENGINE Bus STARTED
^CTraceback (most recent call last):
   File "/wwwapp/", 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>

Any ideas?


"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'

You received this message because you are subscribed to the Google Groups "cherrypy-devel" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at