diff options
| author | Aleksi Häkli <aleksi.hakli@iki.fi> | 2016-12-28 15:04:09 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-12-28 08:04:09 -0500 |
| commit | f6671c5d784e744f18bbc9e06dc4fcdb9e10065b (patch) | |
| tree | de9b11a93cc8fa900247350d5dfef1553b890e1f /django/utils/autoreload.py | |
| parent | 9e734875fe7fb078aa4ef0e84578aa7e641f5563 (diff) | |
Fixed #27647 -- Fixed Windows segmentation fault in runserver autoreload.
Diffstat (limited to 'django/utils/autoreload.py')
| -rw-r--r-- | django/utils/autoreload.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/django/utils/autoreload.py b/django/utils/autoreload.py index 4fba0fe1a0..e7c9acbaea 100644 --- a/django/utils/autoreload.py +++ b/django/utils/autoreload.py @@ -30,6 +30,7 @@ import os import signal +import subprocess import sys import time import traceback @@ -283,11 +284,9 @@ def reloader_thread(): def restart_with_reloader(): while True: args = [sys.executable] + ['-W%s' % o for o in sys.warnoptions] + sys.argv - if sys.platform == "win32": - args = ['"%s"' % arg for arg in args] new_environ = os.environ.copy() new_environ["RUN_MAIN"] = 'true' - exit_code = os.spawnve(os.P_WAIT, sys.executable, args, new_environ) + exit_code = subprocess.call(args, env=new_environ) if exit_code != 3: return exit_code |
