Skip to content

Commit

Permalink
Fixed #4304 -- Modified sys.exit to os._exit to make sure development…
Browse files Browse the repository at this point in the history
… server quits when an error occurs attempting to bind to the requested port (e.g., if another server is already running). Thanks, Mario Gonzalez <gonzalemario@gmail.com>.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@5738 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
russellm committed Jul 21, 2007
1 parent b6ea957 commit 3ff3a42
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ answer newbie questions, and generally made Django that much better:
glin@seznam.cz
martin.glueck@gmail.com
GomoX <gomo@datafull.com>
Mario Gonzalez <gonzalemario @t gmail.com>
Mario Gonzalez <gonzalemario@gmail.com>
Simon Greenhill <dev@simon.net.nz>
Owen Griffiths
Espen Grindhaug <http://grindhaug.org/>
Expand Down
3 changes: 2 additions & 1 deletion django/core/management.py
Original file line number Diff line number Diff line change
Expand Up @@ -1236,7 +1236,8 @@ def inner_run():
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:
Expand Down

0 comments on commit 3ff3a42

Please sign in to comment.