stoddard    00/02/23 07:37:38

  Modified:    src/main http_main.c
  Log:
  2.0 builds, but dumps core on FreeBSD 3.3 (ap_lock).
  
  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 <[EMAIL PROTECTED]>
  Reviewed by:  Bill Stoddard <[EMAIL PROTECTED]>
  
  Revision  Changes    Path
  1.30      +7 -3      apache-2.0/src/main/http_main.c
  
  Index: http_main.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_main.c,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- http_main.c       2000/02/14 22:01:04     1.29
  +++ http_main.c       2000/02/23 15:37:37     1.30
  @@ -290,14 +290,18 @@
       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();
  
  
  

Reply via email to