diff options
author | Jeff Trawick <trawick@apache.org> | 2002-04-18 19:46:20 +0200 |
---|---|---|
committer | Jeff Trawick <trawick@apache.org> | 2002-04-18 19:46:20 +0200 |
commit | 767b98fcf5065bb0e8e1df7d771293aad16b5715 (patch) | |
tree | 3c8f8b6fb182cbde1cbf17f2fab9d11c7f31cb4e | |
parent | Move the mkdir_p check outside of the cache check so that we will always (diff) | |
download | apache2-767b98fcf5065bb0e8e1df7d771293aad16b5715.tar.xz apache2-767b98fcf5065bb0e8e1df7d771293aad16b5715.zip |
back out ill-conceived attempt to fix a segfault during
graceless termination
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94700 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | server/mpm/worker/worker.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/server/mpm/worker/worker.c b/server/mpm/worker/worker.c index 9cefaf94a3..8d77ad68d4 100644 --- a/server/mpm/worker/worker.c +++ b/server/mpm/worker/worker.c @@ -228,10 +228,6 @@ int raise_sigstop_flags; static apr_pool_t *pconf; /* Pool for config stuff */ static apr_pool_t *pchild; /* Pool for httpd child stuff */ -static apr_pool_t *thread_pool; /* pool for APR to use for our - * threads (shouldn't call it - * pthreads :) ) - */ static pid_t ap_my_pid; /* Linux getpid() doesn't work except in main thread. Use this instead */ @@ -920,7 +916,7 @@ static void create_listener_thread(thread_starter *ts) my_info->tid = -1; /* listener thread doesn't have a thread slot */ my_info->sd = 0; rv = apr_thread_create(&ts->listener, thread_attr, listener_thread, - my_info, thread_pool); + my_info, pchild); if (rv != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_ALERT, rv, ap_server_conf, "apr_thread_create: unable to create listener thread"); @@ -992,7 +988,7 @@ static void * APR_THREAD_FUNC start_threads(apr_thread_t *thd, void *dummy) * done because it lets us deal with tid better. */ rv = apr_thread_create(&threads[i], thread_attr, - worker_thread, my_info, thread_pool); + worker_thread, my_info, pchild); if (rv != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_ALERT, rv, ap_server_conf, "apr_thread_create: unable to create worker thread"); @@ -1122,10 +1118,6 @@ static void child_main(int child_num_arg) ap_my_pid = getpid(); apr_pool_create(&pchild, pconf); - /* pool passed to apr_thread_create() can't be cleaned up with pchild - * since that causes segfaults with graceless termination - */ - apr_pool_create(&thread_pool, NULL); /*stuff to do before we switch id's, so we have permissions.*/ ap_reopen_scoreboard(pchild, NULL, 0); @@ -1190,7 +1182,7 @@ static void child_main(int child_num_arg) ts->threadattr = thread_attr; rv = apr_thread_create(&start_thread_id, thread_attr, start_threads, - ts, thread_pool); + ts, pchild); if (rv != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_ALERT, rv, ap_server_conf, "apr_thread_create: unable to create worker thread"); |