summaryrefslogtreecommitdiff
path: root/threadproc/os2
diff options
context:
space:
mode:
authorStefan Fritsch <sf@apache.org>2013-03-23 16:12:00 +0000
committerStefan Fritsch <sf@apache.org>2013-03-23 16:12:00 +0000
commit5c100ea811811cc92bd8fbcaedcbcf58e3c7599c (patch)
treed7528c0c5b50c11450b4d7f9d57aa60043fa7365 /threadproc/os2
parentfdbb812969d7f7cfe055c1fbec8e5d40a35eaf40 (diff)
downloadapr-5c100ea811811cc92bd8fbcaedcbcf58e3c7599c.tar.gz
Add apr_pool_owner_set function to allow use of pool debugging with threads
Actually this function has been mentioned in the docs for over 10 years but has never been implemented. Also consistently destroy the thread's pool when it exits normally, not only on apr_thread_exit(). This was already done on OS2. Other platforms than unix are untested. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1460182 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'threadproc/os2')
-rw-r--r--threadproc/os2/thread.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/threadproc/os2/thread.c b/threadproc/os2/thread.c
index e2cf3f6a8..9911034ae 100644
--- a/threadproc/os2/thread.c
+++ b/threadproc/os2/thread.c
@@ -69,6 +69,7 @@ APR_DECLARE(apr_status_t) apr_threadattr_guardsize_set(apr_threadattr_t *attr,
static void apr_thread_begin(void *arg)
{
apr_thread_t *thread = (apr_thread_t *)arg;
+ apr_pool_owner_set(thread->pool, 0);
thread->exitval = thread->func(thread, thread->data);
apr_pool_destroy(thread->pool);
}