I tried to reopen this bug http://code.djangoproject.com/ticket/9286,
but apparently that's a no-no since it was closed as invalid by a core
developer.
I'd like someone to take another look at it since I think Jacob didn't
understand the bug because the original poster's example was
ambiguous. I supplied my own, more concise example which I'll outline
here. Use the development server to serve any project where a view
tries to start a background process using the subprocess module:
import subprocess
def my_view(request):
subprocess.Popen(['/bin/sleep', '5'])
return HttpResponse(u'That sure took a while!')
This example should start a background process which would run for 5
seconds. Since its a background process, it should not block (but it
still does), try it from the cli:
$ python -i
>>> import subprocess
>>> subprocess.Popen(['/bin/sleep', '30'])
<subprocess.Popen object at 0xb77c606c>
This example does not block, it properly starts the background process
and returns its Popen object immediately.
Also, I tried to send this message a few days ago but I don't see that
it ever made it to the list, hopefully I'm not double-posting.
--stevecrozz
--
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-developers?hl=.