diff --git a/AUTHORS b/AUTHORS index 905cccc7ed..e1a18adf9d 100644 --- a/AUTHORS +++ b/AUTHORS @@ -117,7 +117,7 @@ answer newbie questions, and generally made Django that much better: glin@seznam.cz martin.glueck@gmail.com GomoX - Mario Gonzalez + Mario Gonzalez Simon Greenhill Owen Griffiths Espen Grindhaug diff --git a/django/core/management.py b/django/core/management.py index 06a9a6857c..4c68417517 100644 --- a/django/core/management.py +++ b/django/core/management.py @@ -1236,7 +1236,8 @@ def runserver(addr, port, use_reloader=True, admin_media_dir=''): except (AttributeError, KeyError): error_text = str(e) sys.stderr.write(style.ERROR("Error: %s" % error_text) + '\n') - sys.exit(1) + # Need to use an OS exit because sys.exit doesn't work in a thread + os._exit(1) except KeyboardInterrupt: sys.exit(0) if use_reloader: