]> granicus.if.org Git - apache/commitdiff
2.0 builds, but dumps core on FreeBSD 3.3 (ap_lock).
authorBill Stoddard <stoddard@apache.org>
Wed, 23 Feb 2000 15:37:37 +0000 (15:37 +0000)
committerBill Stoddard <stoddard@apache.org>
Wed, 23 Feb 2000 15:37:37 +0000 (15:37 +0000)
Basically, ap_initialize() needs to get called before create_process(),
since create_process() passes op_on structure to semop() to get a lock, but
op_on isn't initialized until ap_initialize() calls setup_lock().  Here is
a slight rearrangement to main() which calls ap_initialize() earlier...

Submitted by: Jeff Trawick <trawick@us.ibm.com>
Reviewed by: Bill Stoddard <stoddard@us.ibm.com>

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

server/main.c

index 1fb6e684ad3295b3d5ce174e475ab6fab4c8dafc..b71e77b6382009dc28b2e96839c8012164c9353a 100644 (file)
@@ -290,14 +290,18 @@ API_EXPORT_NONSTD(int)        main(int argc, char *argv[])
     int configtestonly = 0;
     const char *confname = SERVER_CONFIG_FILE;
     const char *def_server_root = HTTPD_ROOT;
-    process_rec *process = create_process(argc, (const char **)argv);
+    process_rec *process;
     server_rec *server_conf;
-    ap_context_t *pglobal = process->pool;
-    ap_context_t *pconf = process->pconf;
+    ap_context_t *pglobal;
+    ap_context_t *pconf;
     ap_context_t *plog; /* Pool of log streams, reset _after_ each read of conf */
     ap_context_t *ptemp; /* Pool for temporary config stuff, reset often */
     ap_context_t *pcommands; /* Pool for -C and -c switches */
 
+    ap_initialize();
+    process = create_process(argc, (const char **)argv);
+    pglobal = process->pool;
+    pconf = process->pconf;
     ap_server_argv0 = process->short_name;
     
     ap_util_uri_init();