Starting a subprocess causes incomplete requests in dev server
|Reported by:||John Shaffer <jshaffer2112@…>||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
If you open a subprocess in your view, the request will not be completely sent to the browser. Using subprocess.Popen(process, close_fds=True) will bypass this problem, but close_fds is unimplemented on Windows.
With the following view, the redirect is never received if using the dev server. The dev server will still be active and will continue to serve requests, but any requests to the hang view will not complete. When using mod_python, the redirect will work.
import subprocess from django import http def hang(request): proc = subprocess.Popen('python') return http.HttpResponseRedirect('/')
#3712 might be related.
Change History (4)
comment:1 follow-up: ↓ 2 Changed 9 years ago by Ramiro Morales
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
comment:2 in reply to: ↑ 1 Changed 9 years ago by John Shaffer <jshaffer2112@…>
- Component changed from Uncategorized to django-admin.py runserver
- Owner changed from jacob to adrian