From c976aaa411b578506da28975ffff597fe48a4f90 Mon Sep 17 00:00:00 2001 From: David Reid Date: Thu, 22 Jun 2000 00:47:54 +0000 Subject: [PATCH] Correct the pid that's being stored in the child_table to reflect what it's 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 | 7 ++++++- server/mpm/beos/scoreboard.c | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/server/mpm/beos/beos.c b/server/mpm/beos/beos.c index b70576bb16..05f9bc7bbb 100644 --- a/server/mpm/beos/beos.c +++ b/server/mpm/beos/beos.c @@ -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; } diff --git a/server/mpm/beos/scoreboard.c b/server/mpm/beos/scoreboard.c index b85f79a722..78e6c82784 100644 --- a/server/mpm/beos/scoreboard.c +++ b/server/mpm/beos/scoreboard.c @@ -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!"); -- 2.50.1