Fixed #10725 -- When the child process spawned by the autoreloader gets killed by a signal, passed the signal to the parent, in order to make debugging easier.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17296 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Aymeric Augustin 2011-12-30 14:12:31 +00:00
parent fa226cd740
commit baf63f6e57
1 changed files with 5 additions and 1 deletions

View File

@ -115,7 +115,11 @@ def python_reloader(main_func, args, kwargs):
pass
else:
try:
sys.exit(restart_with_reloader())
exit_code = restart_with_reloader()
if exit_code < 0:
os.kill(os.getpid(), -exit_code)
else:
sys.exit(exit_code)
except KeyboardInterrupt:
pass