Quantcast

CherryPy hangs after Control-C

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

CherryPy hangs after Control-C

Michiel Overtoom

Hi,

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>
     cherrypy.engine.block()
   File
"/usr/local/lib/python2.6/site-packages/CherryPy-3.2.0rc1-py2.6.egg/cherrypy/process/wspbus.py",
line 284, in block
     self.wait(states.EXITING, interval=interval, channel='main')
KeyboardInterrupt

...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:

     cherrypy.config.update("/wwwapp/chsite.conf")
     # <lots of other config stuff snipped>
     cherrypy.engine.signal_handler.subscribe()
     cherrypy.engine.start()
     cherrypy.engine.block()

Any ideas?

Greetings,

--
"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 http://groups.google.com/group/cherrypy-devel?hl=en.

Loading...