You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2009/05/11 17:13:21 UTC

svn commit: r773595 - /httpd/mod_fcgid/trunk/mod_fcgid/arch/unix/fcgid_pm_unix.c

Author: trawick
Date: Mon May 11 15:13:21 2009
New Revision: 773595

URL: http://svn.apache.org/viewvc?rev=773595&view=rev
Log:
improve messaging for errors setting up the unix socket directory
  distinguish between errors with directory creation vs. changing ownership
  show the name of the directory created
  report the errno for chown() failures

Modified:
    httpd/mod_fcgid/trunk/mod_fcgid/arch/unix/fcgid_pm_unix.c

Modified: httpd/mod_fcgid/trunk/mod_fcgid/arch/unix/fcgid_pm_unix.c
URL: http://svn.apache.org/viewvc/httpd/mod_fcgid/trunk/mod_fcgid/arch/unix/fcgid_pm_unix.c?rev=773595&r1=773594&r2=773595&view=diff
==============================================================================
--- httpd/mod_fcgid/trunk/mod_fcgid/arch/unix/fcgid_pm_unix.c (original)
+++ httpd/mod_fcgid/trunk/mod_fcgid/arch/unix/fcgid_pm_unix.c Mon May 11 15:13:21 2009
@@ -295,11 +295,17 @@
         if ((rv = apr_dir_make_recursive(get_socketpath(main_server),
                                          APR_UREAD | APR_UWRITE |
                                          APR_UEXECUTE,
-                                         configpool)) != APR_SUCCESS
-            || chown(get_socketpath(main_server), unixd_config.user_id,
-                     -1) < 0) {
+                                         configpool)) != APR_SUCCESS) {
             ap_log_error(APLOG_MARK, APLOG_ERR, rv, main_server,
-                         "mod_fcgid: Can't create unix socket dir");
+                         "mod_fcgid: Can't create unix socket dir %s",
+                         get_socketpath(main_server));
+            exit(1);
+        }
+
+        if (chown(get_socketpath(main_server), unixd_config.user_id, -1) < 0) {
+            ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server,
+                         "mod_fcgid: Can't set ownership of unix socket dir %s",
+                         get_socketpath(main_server));
             exit(1);
         }
     }