httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r609366 - /httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.c
Date Sun, 06 Jan 2008 18:22:38 GMT
Author: wrowe
Date: Sun Jan  6 10:22:37 2008
New Revision: 609366

URL: http://svn.apache.org/viewvc?rev=609366&view=rev
Log:
Copying this code requires a (global) pool and rv declaration.

We don't need to replace this upon restart, so the global pool 
is ideal, and ap_my_generation is a good test for this.

Modified:
    httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.c

Modified: httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.c?rev=609366&r1=609365&r2=609366&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.c (original)
+++ httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.c Sun Jan  6 10:22:37 2008
@@ -1372,21 +1372,23 @@
                      service_name);
         exit(APEXIT_INIT);
     }
-    else if (!one_process) {
+    else if (!one_process && !ap_my_generation) {
         /* Open a null handle to soak stdout in this process.
          * We need to emulate apr_proc_detach, unix performs this
          * same check in the pre_config hook (although it is
          * arguably premature).  Services already fixed this.
          */
         apr_file_t *nullfile;
+        apr_status_t rv;
+        apr_pool_t *pproc = apr_pool_parent_get(pconf);
 
         if ((rv = apr_file_open(&nullfile, "NUL",
                                 APR_READ | APR_WRITE, APR_OS_DEFAULT,
-                                process->pool)) == APR_SUCCESS) {
+                                pproc)) == APR_SUCCESS) {
             apr_file_t *nullstdout;
-            if (apr_file_open_stdout(&nullstdout, process->pool)
+            if (apr_file_open_stdout(&nullstdout, pproc)
                     == APR_SUCCESS)
-                apr_file_dup2(nullstdout, nullfile, process->pool);
+                apr_file_dup2(nullstdout, nullfile, pproc);
             apr_file_close(nullfile);
         }
     }



Mime
View raw message