summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2005-10-09 14:09:56 +0000
committertrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2005-10-09 14:09:56 +0000
commitbaca36ac27eba495905d6ae445b835636d431fcd (patch)
treefe4e585c78ecbc9f5cdf31d385bc4ea49797bf01
parente98351d7299e38616217f881f30bc9fcca8d2c2f (diff)
downloadlibapr-baca36ac27eba495905d6ae445b835636d431fcd.tar.gz
Pick up some fixes from testprocmutex.c; now it works consistently
on RHAS 3. These changes are apparently not applicable to other branches. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/0.9.x@307438 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--test/testglobalmutex.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/testglobalmutex.c b/test/testglobalmutex.c
index 5d77974ac..948e81578 100644
--- a/test/testglobalmutex.c
+++ b/test/testglobalmutex.c
@@ -32,7 +32,7 @@
apr_global_mutex_t *global_lock;
apr_pool_t *pool;
-int *x;
+volatile int *x;
static int make_child(apr_proc_t **proc, apr_pool_t *p)
{
@@ -43,6 +43,10 @@ static int make_child(apr_proc_t **proc, apr_pool_t *p)
apr_sleep (1);
if (apr_proc_fork(*proc, p) == APR_INCHILD) {
+ apr_initialize();
+
+ apr_global_mutex_child_init(&global_lock, NULL, p);
+
while (1) {
apr_global_mutex_lock(global_lock);
if (i == MAX_ITER) {