httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r1312063 - /httpd/mod_fcgid/trunk/modules/fcgid/fcgid_conf.c
Date Wed, 11 Apr 2012 01:16:04 GMT
Author: trawick
Date: Wed Apr 11 01:16:03 2012
New Revision: 1312063

URL: http://svn.apache.org/viewvc?rev=1312063&view=rev
Log:
fix messaging/error handler for a command processor:
 the APLOG_INFO message wasn't visible anywhere and wouldn't be
 desired on the console, so zap it

 the ap_log_error() messages for processing failures needed 
 APLOG_STARTUP for console prettiness (no timestamp) and were 
 changed to ap_log_perror 

 return non-NULL for processing failures since the feature
 "required" by the administrator couldn't be enabled

Modified:
    httpd/mod_fcgid/trunk/modules/fcgid/fcgid_conf.c

Modified: httpd/mod_fcgid/trunk/modules/fcgid/fcgid_conf.c
URL: http://svn.apache.org/viewvc/httpd/mod_fcgid/trunk/modules/fcgid/fcgid_conf.c?rev=1312063&r1=1312062&r2=1312063&view=diff
==============================================================================
--- httpd/mod_fcgid/trunk/modules/fcgid/fcgid_conf.c (original)
+++ httpd/mod_fcgid/trunk/modules/fcgid/fcgid_conf.c Wed Apr 11 01:16:03 2012
@@ -776,6 +776,7 @@ const char *set_win32_prevent_process_or
     fcgid_server_conf *config = ap_get_module_config(s->module_config,
                                                      &fcgid_module);
     const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
+#define SETUP_ERR_MSG "Error enabling CGI process orphan prevention"
 
     if (err != NULL) {
         return err;
@@ -788,10 +789,9 @@ const char *set_win32_prevent_process_or
         config->hJobObjectForAutoCleanup = CreateJobObject(NULL, NULL);
 
         if (config->hJobObjectForAutoCleanup == NULL) {
-            ap_log_error(APLOG_MARK, APLOG_ERR, apr_get_os_error(), NULL,
-                         "mod_fcgid: Error enabling CGI process orphan "
-                         "prevention: unable to create job object.");
-            return NULL;
+            ap_log_perror(APLOG_MARK, APLOG_STARTUP|APLOG_ERR, apr_get_os_error(),
+                          cmd->pool, "mod_fcgid: unable to create job object.");
+            return SETUP_ERR_MSG;
         }
 
         /* Set job info so that all spawned CGI processes are associated
@@ -802,16 +802,12 @@ const char *set_win32_prevent_process_or
         if (SetInformationJobObject(config->hJobObjectForAutoCleanup,
                                     JobObjectExtendedLimitInformation,
                                     &job_info, sizeof(job_info)) == 0) {
-            ap_log_error(APLOG_MARK, APLOG_ERR, apr_get_os_error(), NULL,
-                         "mod_fcgid: Error enabling CGI process orphan "
-                         "prevention: unable to set job object information.");
+            ap_log_perror(APLOG_MARK, APLOG_STARTUP|APLOG_ERR, apr_get_os_error(),
+                          cmd->pool, "mod_fcgid: unable to set job object information.");
             CloseHandle(config->hJobObjectForAutoCleanup);
             config->hJobObjectForAutoCleanup = NULL;
-            return NULL;
+            return SETUP_ERR_MSG;
         }
-
-        ap_log_error(APLOG_MARK, APLOG_INFO, 0, NULL,
-                     "mod_fcgid: Enabled CGI process orphan prevention flag.");
     }
 
     return NULL;



Mime
View raw message