Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Aymeric Augustin authored December 30, 2011

Showing 1 changed file with 5 additions and 1 deletion. Show diff stats Hide diff stats

  1. 6  django/utils/autoreload.py
6  django/utils/autoreload.py
@@ -115,7 +115,11 @@ def python_reloader(main_func, args, kwargs):
115 115
             pass
116 116
     else:
117 117
         try:
118  
-            sys.exit(restart_with_reloader())
  118
+            exit_code = restart_with_reloader()
  119
+            if exit_code < 0:
  120
+                os.kill(os.getpid(), -exit_code)
  121
+            else:
  122
+                sys.exit(exit_code)
119 123
         except KeyboardInterrupt:
120 124
             pass
121 125
 

0 notes on commit baf63f6

Please sign in to comment.
Something went wrong with that request. Please try again.