]> granicus.if.org Git - apache/commitdiff
Correct the pid that's being stored in the child_table to reflect what it's
authorDavid Reid <dreid@apache.org>
Thu, 22 Jun 2000 00:47:54 +0000 (00:47 +0000)
committerDavid Reid <dreid@apache.org>
Thu, 22 Jun 2000 00:47:54 +0000 (00:47 +0000)
supposed to (doh!) and fix some things to help with restarts.

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

server/mpm/beos/beos.c
server/mpm/beos/scoreboard.c

index b70576bb16cc3844f40e06c8c2ad547a34bff8ab..05f9bc7bbb5e53ee5b892d608e1f23bad8ac6192 100644 (file)
@@ -564,7 +564,7 @@ This is deliberate to remind me to do something about it!
     }
     resume_thread(tid);
     
-    ap_child_table[slot].pid = getpid();
+    ap_child_table[slot].pid = tid;
     ap_child_table[slot].status = SERVER_ALIVE;
     return 0;
 }
@@ -889,6 +889,11 @@ int ap_mpm_run(ap_pool_t *_pconf, ap_pool_t *plog, server_rec *s)
         ap_restart_time = time(NULL); 
     }
 
+    /* just before we go, tidy up the locks we've created to prevent a 
+     * potential leak of semaphores... */
+    ap_destroy_lock(worker_thread_count_mutex);
+    ap_destroy_lock(accept_mutex);
+
     return 0;
 }
 
index b85f79a722113e14c5847e3444740d3e459cc2ea..78e6c827844e1e48e7cbf0e527d9ab5ccafe944d 100644 (file)
@@ -73,8 +73,8 @@ static int maintain_connection_status = 1;
 
 void reinit_scoreboard(ap_pool_t *p)
 {
-    ap_assert(!ap_scoreboard_image);
-    ap_scoreboard_image = (scoreboard *) malloc(SCOREBOARD_SIZE);
+    if (!ap_scoreboard_image)
+        ap_scoreboard_image = (scoreboard *) malloc(SCOREBOARD_SIZE);
     if (ap_scoreboard_image == NULL) {
         ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
                      "Ouch! Out of memory reiniting scoreboard!");