]> granicus.if.org Git - apache/commitdiff
when we bail out due to a fatal error in apr_shm_init(), be sure
authorJeff Trawick <trawick@apache.org>
Thu, 30 Aug 2001 15:44:13 +0000 (15:44 +0000)
committerJeff Trawick <trawick@apache.org>
Thu, 30 Aug 2001 15:44:13 +0000 (15:44 +0000)
to print the apr_status_t in numeric form

the old message

lt-httpd: could not open(create) scoreboard: Unknown resolver error

wasn't so useful, but the new, improved message

lt-httpd: could not open(create) scoreboard: (22528)Unknown resolver error

makes it look like a syscall is returning ENOSPC and that apr shmem
is returning (APR_OS_START_SYSERR + errno) instead of simply errno.

off to APR land...

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90814 13f79535-47bb-0310-9956-ffa450edef68

server/scoreboard.c

index 5b424fd93a082cdc7e8aeb618cee3225185a3b78..e455d00209c1e817e8f981e9fd8c956a06b408f6 100644 (file)
@@ -130,8 +130,8 @@ static void setup_shared(apr_pool_t *p)
     fname = ap_server_root_relative(p, ap_scoreboard_fname);
     rv = apr_shm_init(&scoreboard_shm, SCOREBOARD_SIZE, fname, p);
     if (rv != APR_SUCCESS) {
-        apr_snprintf(buf, sizeof(buf), "%s: could not open(create) scoreboard: %s",
-                    ap_server_argv0, apr_strerror(rv, errmsg, sizeof errmsg));
+        apr_snprintf(buf, sizeof(buf), "%s: could not open(create) scoreboard: (%d)%s",
+                    ap_server_argv0, rv, apr_strerror(rv, errmsg, sizeof errmsg));
         fprintf(stderr, "%s\n", buf);
         exit(APEXIT_INIT);
     }