httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: [Fwd: Apache httpd vulenrabilities]
Date Fri, 01 Jun 2007 14:50:09 GMT

On Jun 1, 2007, at 10:19 AM, Colm MacCarthaigh wrote:

> On Fri, Jun 01, 2007 at 10:05:26AM -0400, Jim Jagielski wrote:
>> -	if (ap_scoreboard_image->servers[n].status != SERVER_DEAD &&
>> -		kill((pid = ap_scoreboard_image->parent[n].pid), 0) == -1) {
>> -	    ap_update_child_status(n, SERVER_DEAD, NULL);
>> -	    /* just mark it as having a successful exit status */
>> -	    bzero((char *) status, sizeof(ap_wait_t));
>> -	    return(pid);
>> -	}
>> +        pid = ap_scoreboard_image->parent[n].pid;
>> +        if (ap_scoreboard_image->servers[n].status != SERVER_DEAD) {
>> +            if (in_pid_table(pid)) {
>> +                if (kill(pid, 0) == -1) {
>> +                    ap_update_child_status(n, SERVER_DEAD, NULL);
>> +                    /* just mark it as having a successful exit
>> status */
>> +                    bzero((char *) status, sizeof(ap_wait_t));
>> +                    return(pid);
>> +                }
>
> Should we get rid of it from the table here? Can we get away without
> removing stale pids in general? What if they are recycled by the OS
> for something else?
>

No, that's a good point. We should likely remove the
pid from our table once the child goes away.


Mime
View raw message