summaryrefslogtreecommitdiff
path: root/django/utils/autoreload.py
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2011-12-30 14:12:31 +0000
committerAymeric Augustin <aymeric.augustin@m4x.org>2011-12-30 14:12:31 +0000
commitbaf63f6e5731bea3da74803ac17be890a99b056b (patch)
treef60a57e2a120860cf109c5e4166edd84a8fa2113 /django/utils/autoreload.py
parentfa226cd740f1349383d5e8399dc8a5255b70f07a (diff)
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
Diffstat (limited to 'django/utils/autoreload.py')
-rw-r--r--django/utils/autoreload.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/django/utils/autoreload.py b/django/utils/autoreload.py
index ffc60d4b14..85d9907856 100644
--- a/django/utils/autoreload.py
+++ b/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