On Dec 15, 2:42 pm, "Anand Chitipothu" <[email protected]> wrote: > I fixed it now. > > http://github.com/webpy/webpy/commit/193d066ef59aefa2392f212708f3e0cc... > > Both `raise KeyboardInterrupt` and `sys.exit()` stop the application now.
FWIW, in Apache/mod_wsgi it specifically detects SystemExit generated from a request handler and logs a different message which can be identified distinct from any other type of unhandled exception. Other than that it doesn't do anything else and you would still get a 500 error if the WSGI application hadn't itself caught it and generated a 500 response page. Apache/mod_wsgi works this way because view request handler code trying to force a process exit by calling sys.exit() would generally be bad practice and not something that should be encouraged for portable WSGI web applications. Obviously the Apache/mod_wsgi situation is a bit different because you might be hosting multiple applications in same process and you don't want one screwing up others or stuffing up Apache itself. Yes, they can still use os.kill(), but that is much more of a conscious choice where as sys.exit() could be innocently added when it shouldn't, be it for debugging purposes or as some sort of failure recovery. Personally I would counsel against allowing sys.exit() to do this. Can use os.kill() if they really want to, with suitable huge comments in code about why it is being done. Graham --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web.py" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/webpy?hl=en -~----------~----~----~----~------~----~------~--~---
