httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: cvs commit: apache-1.3/src/modules/standard mod_status.c
Date Fri, 30 Oct 1998 18:24:10 GMT
Marc Slemko wrote:
> 
> On Fri, 30 Oct 1998, Jim Jagielski wrote:
> 
> > > >   -    char vhost[32];		/* What virtual host is being accessed? */
> > > >   +    server_rec *vhostrec;	/* What virtual host is being accessed? */
> > > 
> > > I was thinking, couldn't we do the same for 'request' as well? Simply point
> > > ss->request to r->the_request? This would get rid of another string copy?
> > > Can't do this with 'client' but request seems right.
> > > 
> > 
> > Forget this... In fact, I think we need to back out the above. From what I
> > can see, once the child dies, current_con goes away and thus the
> > pointer for vhostrec is no longer valid, and so the data pointed
> > to by r->server is garbage, or at least we have no guarantee of it's
> > validity.
> 
> There is the exact same situation before and after the child dies.  In
> both, we can not access memory from another child process.  the
> r->server is _not_ created for each request, but is simply a pointer to
> the struct created at config time.  Because it is created in the parent,
> it will be at the same address in each child.
> 

Ack. You're right. What's being finally referenced is the global data,
which stays around. What got me was the fact that current_con would
"go away", but the eventually data itself is the hash.
-- 
===========================================================================
   Jim Jagielski   |||   jim@jaguNET.com   |||   http://www.jaguNET.com/
            "That's no ordinary rabbit... that's the most foul,
            cruel and bad-tempered rodent you ever laid eyes on"

Mime
View raw message