From: Greg Ames Date: Wed, 11 Apr 2001 02:01:16 +0000 (+0000) Subject: Fix the naming of the apr_threadattr_detach_xxx functions. get and set were X-Git-Tag: 2.0.17~54 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=426271e5cec74f8b23d90ca76a7cc1ac2bac71d1;p=apache Fix the naming of the apr_threadattr_detach_xxx functions. get and set were reversed. This may have broken the Unix threaded mpm's when they started using the bogus "set" function. A likely symptom would be failure to stop a threaded process cleanly. Note: it appears these functions are essentially no-ops except in Unix. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88805 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/mpm/experimental/perchild/perchild.c b/server/mpm/experimental/perchild/perchild.c index edf3083ab4..d08bb769a7 100644 --- a/server/mpm/experimental/perchild/perchild.c +++ b/server/mpm/experimental/perchild/perchild.c @@ -917,7 +917,7 @@ static void child_main(int child_num_arg) NULL, pchild); apr_threadattr_create(&worker_thread_attr, pchild); - apr_threadattr_detach_set(worker_thread_attr); + apr_threadattr_detach_set(worker_thread_attr, 1); apr_create_signal_thread(&thread, worker_thread_attr, check_signal, pchild); /* We are creating worker threads right now */ diff --git a/server/mpm/perchild/perchild.c b/server/mpm/perchild/perchild.c index edf3083ab4..d08bb769a7 100644 --- a/server/mpm/perchild/perchild.c +++ b/server/mpm/perchild/perchild.c @@ -917,7 +917,7 @@ static void child_main(int child_num_arg) NULL, pchild); apr_threadattr_create(&worker_thread_attr, pchild); - apr_threadattr_detach_set(worker_thread_attr); + apr_threadattr_detach_set(worker_thread_attr, 1); apr_create_signal_thread(&thread, worker_thread_attr, check_signal, pchild); /* We are creating worker threads right now */ diff --git a/server/mpm/threaded/threaded.c b/server/mpm/threaded/threaded.c index 4a0a3f7a53..96bfada842 100644 --- a/server/mpm/threaded/threaded.c +++ b/server/mpm/threaded/threaded.c @@ -657,7 +657,7 @@ static void child_main(int child_num_arg) apr_lock_create(&pipe_of_death_mutex, APR_MUTEX, APR_INTRAPROCESS, NULL, pchild); apr_threadattr_create(&thread_attr, pchild); - apr_threadattr_detach_set(thread_attr); + apr_threadattr_detach_set(thread_attr, 1); rv = apr_create_signal_thread(&thread, thread_attr, check_signal, pchild); if (rv != APR_SUCCESS) {