Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #10725 -- When the child process spawned by the autoreloader ge…

…ts 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
  • Loading branch information...
commit baf63f6e5731bea3da74803ac17be890a99b056b 1 parent fa226cd
@aaugustin aaugustin authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 django/utils/autoreload.py
View
6 django/utils/autoreload.py
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.