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 STATUS
Date Thu, 10 Dec 1998 14:44:42 GMT
Jim Jagielski wrote:
> 
> jim@hyperreal.org wrote:
> > 
> >   +
> >   +    * 'kill -HUP' broken on FreeBSD and others: child processes die or
> >   +       do not restart.
> >   +
> 
> Looking over http_main.c, I think it's because of tests like:
> 
> 
> 	ap_sync_scoreboard_image();
> 	if (ap_scoreboard_image->global.running_generation != ap_my_generation) {
> 	    clean_child_exit(0);
> 	}
> 
> Shouldn't that be '>= ap_my_generation' rather than '!= ap_my_generation' ?

There's also the section:

    Explain1("Starting new child in slot %d", slot);
    (void) ap_update_child_status(slot, SERVER_STARTING, (request_rec *) NULL);

    /* clean up the slot's vhostrec pointer now that it is being re-used,
     * and mark the slot as beloging to a new generation.
     */
    /* XXX: there's still a race condition here for file-based scoreboards...
     * but... like, do we really care to spend yet another write() operation
     * here? -djg
     */
    ap_scoreboard_image->servers[slot].vhostrec = NULL;
    ap_scoreboard_image->parent[slot].generation = ap_my_generation;

Couldn't we adjust ap_update_child_status so that when it sees a status
of SERVER_STARTING, it automatically does the vhostrec and generation
adjustments? This would also remove the race-condition as well.
-- 
===========================================================================
   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