httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Colm MacCarthaigh <c...@stdlib.net>
Subject Re: [Fwd: Apache httpd vulenrabilities]
Date Fri, 01 Jun 2007 14:19:30 GMT
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?

-- 
Colm MacCárthaigh                        Public Key: colm+pgp@stdlib.net

Mime
View raw message