#4953 closed (duplicate)
Starting a subprocess causes incomplete requests in dev server
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | django-admin.py runserver | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
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)
follow-up: 2 comment:1 by , 17 years ago
comment:2 by , 17 years ago
Component: | Uncategorized → django-admin.py runserver |
---|---|
Owner: | changed from | to
Replying to Ramiro Morales:
IMVHO, having to cope with this kind of specific scenario is very well outside of the scope of the development server. If the mod_python setup works then it may be better to set up a apache+mod_python developent environment.
It really depends on the nature of the fix. If it involves many changes, then it probably is not worth applying. But if it's a small change, then there is likely no reason not to apply it.
I'll post again when I have time to try to narrow down the cause, and if I'm able to produce a fix.
comment:3 by , 17 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
dup of #3712 which is invalid.
IMVHO, having to cope with this kind of specific scenario is very well outside of the scope of the development server. If the mod_python setup works then it may be better to set up a apache+mod_python developent environment.