#8540: daemonize should close all open files
-------------------------------------+--------------------------------------
          Reporter:  paulegan        |         Owner:  nobody                   
      
            Status:  new             |     Milestone:  post-1.0                 
      
         Component:  Core framework  |       Version:  SVN                      
      
        Resolution:                  |      Keywords:  daemonize become_daemon 
fastcgi
             Stage:  Accepted        |     Has_patch:  1                        
      
        Needs_docs:  0               |   Needs_tests:  0                        
      
Needs_better_patch:  1               |  
-------------------------------------+--------------------------------------
Comment (by dcwatson):

 I also ran into this issue when spawning a daemon from a view to build
 some reports. Basically, the view called a script using `os.system`, and
 the script set `DJANGO_SETTINGS_MODULE` and did some processing using
 django, after calling `become_daemon`. The `os.system` call would return
 immediately, but it looked like django would not finish it's request
 processing until after the spawned script finished. Applying this patch
 fixed the problem.

 I don't fully understand the black art of daemonization, but it seems like
 this may not even be an issue on Windows. Nothing is being forked, there
 is no "parent process", it's just redirecting `stdin`, `stdout`, and
 `stderr`. Regardless, it seems like fixing a bug for posix systems, even
 if still exists on Windows, is better for 1.0 than leaving the bug for
 both.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/8540#comment:6>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" 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-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to