You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ni...@apache.org on 2006/05/07 23:03:40 UTC
svn commit: r404850 - in /httpd/httpd/trunk/server/mpm:
experimental/event/event.c worker/worker.c
Author: niq
Date: Sun May 7 14:03:39 2006
New Revision: 404850
URL: http://svn.apache.org/viewcvs?rev=404850&view=rev
Log:
Initialise server generation (Chris Darroch)
Modified:
httpd/httpd/trunk/server/mpm/experimental/event/event.c
httpd/httpd/trunk/server/mpm/worker/worker.c
Modified: httpd/httpd/trunk/server/mpm/experimental/event/event.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/server/mpm/experimental/event/event.c?rev=404850&r1=404849&r2=404850&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/experimental/event/event.c (original)
+++ httpd/httpd/trunk/server/mpm/experimental/event/event.c Sun May 7 14:03:39 2006
@@ -395,7 +395,7 @@
static int volatile restart_pending;
static int volatile is_graceful;
static volatile int child_fatal;
-ap_generation_t volatile ap_my_generation;
+ap_generation_t volatile ap_my_generation = 0;
/*
* ap_start_shutdown() and ap_start_restart(), below, are a first stab at
Modified: httpd/httpd/trunk/server/mpm/worker/worker.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/server/mpm/worker/worker.c?rev=404850&r1=404849&r2=404850&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/worker/worker.c (original)
+++ httpd/httpd/trunk/server/mpm/worker/worker.c Sun May 7 14:03:39 2006
@@ -353,7 +353,7 @@
static int volatile restart_pending;
static int volatile is_graceful;
static volatile int child_fatal;
-ap_generation_t volatile ap_my_generation;
+ap_generation_t volatile ap_my_generation = 0;
/*
* ap_start_shutdown() and ap_start_restart(), below, are a first stab at
Re: svn commit: r404850 - in /httpd/httpd/trunk/server/mpm: experimental/event/event.c worker/worker.c
Posted by Jeff Trawick <tr...@gmail.com>.
On 5/7/06, niq@apache.org <ni...@apache.org> wrote:
> Author: niq
> Date: Sun May 7 14:03:39 2006
> New Revision: 404850
>
> URL: http://svn.apache.org/viewcvs?rev=404850&view=rev
> Log:
> Initialise server generation (Chris Darroch)
>
> Modified:
> httpd/httpd/trunk/server/mpm/experimental/event/event.c
> httpd/httpd/trunk/server/mpm/worker/worker.c
>
> Modified: httpd/httpd/trunk/server/mpm/experimental/event/event.c
> URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/server/mpm/experimental/event/event.c?rev=404850&r1=404849&r2=404850&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/server/mpm/experimental/event/event.c (original)
> +++ httpd/httpd/trunk/server/mpm/experimental/event/event.c Sun May 7 14:03:39 2006
> @@ -395,7 +395,7 @@
> static int volatile restart_pending;
> static int volatile is_graceful;
> static volatile int child_fatal;
> -ap_generation_t volatile ap_my_generation;
> +ap_generation_t volatile ap_my_generation = 0;
Too many people are confused about what the value of global variables
is guaranteed to be. IMHO, adding initialization of one variable just
feeds the fire.