diff options
author | Jeff Trawick <trawick@apache.org> | 2011-03-04 23:12:21 +0100 |
---|---|---|
committer | Jeff Trawick <trawick@apache.org> | 2011-03-04 23:12:21 +0100 |
commit | 3b75c2651668fcf6d395a28a564c6c3b8166cb1d (patch) | |
tree | 5365ddf1d0956da8c80876f74dfe6252b70efd44 /server/mpm/prefork | |
parent | mod_cache_disk: Prevent a segfault should we receive a further bucket after (diff) | |
download | apache2-3b75c2651668fcf6d395a28a564c6c3b8166cb1d.tar.xz apache2-3b75c2651668fcf6d395a28a564c6c3b8166cb1d.zip |
sanity check use of volatile in prefork, worker, and event
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1078170 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/mpm/prefork')
-rw-r--r-- | server/mpm/prefork/prefork.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index 7bac60d66b..ebc36c6ccb 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -133,9 +133,7 @@ static apr_pool_t *pchild; /* Pool for httpd child stuff */ static pid_t ap_my_pid; /* it seems silly to call getpid all the time */ static pid_t parent_pid; static int my_child_num; -static ap_generation_t volatile my_generation=0; - -static volatile int die_now = 0; +static ap_generation_t my_generation=0; #ifdef GPROF /* @@ -316,6 +314,12 @@ static void just_die(int sig) clean_child_exit(0); } +/* volatile because they're updated from a signal handler */ +static int volatile shutdown_pending; +static int volatile restart_pending; +static int volatile is_graceful; +static int volatile die_now = 0; + static void stop_listening(int sig) { mpm_state = AP_MPMQ_STOPPING; @@ -325,11 +329,6 @@ static void stop_listening(int sig) die_now = 1; } -/* volatile just in case */ -static int volatile shutdown_pending; -static int volatile restart_pending; -static int volatile is_graceful; - static void sig_term(int sig) { if (shutdown_pending == 1) { |