]> granicus.if.org Git - apache/commitdiff
get rid of some invalid errno references; use the apr_status_t instead
authorJeff Trawick <trawick@apache.org>
Tue, 9 Jan 2001 05:12:40 +0000 (05:12 +0000)
committerJeff Trawick <trawick@apache.org>
Tue, 9 Jan 2001 05:12:40 +0000 (05:12 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87630 13f79535-47bb-0310-9956-ffa450edef68

modules/filters/mod_include.c

index ff00fedbf1a7a351379a2a7e16d048cc812b2cd7..a9e549794d1572cdd5fb8f16c22468a8dc4e8a3d 100644 (file)
@@ -1020,10 +1020,10 @@ static int include_cmd(include_ctx_t *ctx, ap_bucket_brigade **bb, char *s,
                   ap_escape_shell_cmd(r->pool, arg_copy));
     }
 
-    if ((apr_createprocattr_init(&procattr, r->pool) != APR_SUCCESS) ||
-        (apr_setprocattr_io(procattr, APR_NO_PIPE, 
-                           APR_FULL_BLOCK, APR_NO_PIPE) != APR_SUCCESS) ||
-        (apr_setprocattr_dir(procattr, ap_make_dirstr_parent(r->pool, r->filename)) != APR_SUCCESS) ||
+    if (((rc = apr_createprocattr_init(&procattr, r->pool)) != APR_SUCCESS) ||
+        ((rc = apr_setprocattr_io(procattr, APR_NO_PIPE, 
+                                  APR_FULL_BLOCK, APR_NO_PIPE)) != APR_SUCCESS) ||
+        ((rc = apr_setprocattr_dir(procattr, ap_make_dirstr_parent(r->pool, r->filename))) != APR_SUCCESS) ||
 #ifdef RLIMIT_CPU
         ((rc = apr_setprocattr_limit(procattr, APR_LIMIT_CPU, conf->limit_cpu)) != APR_SUCCESS) ||
 #endif
@@ -1033,9 +1033,9 @@ static int include_cmd(include_ctx_t *ctx, ap_bucket_brigade **bb, char *s,
 #ifdef RLIMIT_NPROC
         ((rc = apr_setprocattr_limit(procattr, APR_LIMIT_NPROC, conf->limit_nproc)) != APR_SUCCESS) ||
 #endif
-        (apr_setprocattr_cmdtype(procattr, APR_SHELLCMD) != APR_SUCCESS)) {
+        ((rc = apr_setprocattr_cmdtype(procattr, APR_SHELLCMD)) != APR_SUCCESS)) {
         /* Something bad happened, tell the world. */
-       ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r,
+       ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r,
             "couldn't initialize proc attributes: %s %s", r->filename, s);
         rc = !APR_SUCCESS;
     }
@@ -1050,7 +1050,7 @@ static int include_cmd(include_ctx_t *ctx, ap_bucket_brigade **bb, char *s,
 
         if (rc != APR_SUCCESS) {
             /* Bad things happened. Everyone should have cleaned up. */
-            ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r,
+            ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r,
                         "couldn't create child process: %d: %s", rc, s);
         }
         else {