You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by rb...@covalent.net on 2001/03/22 21:37:54 UTC
Re: cvs commit: httpd-2.0/server/mpm/threaded threaded.c
On 22 Mar 2001 stoddard@apache.org wrote:
> stoddard 01/03/22 11:29:10
>
> Modified: . CHANGES
> server/mpm/threaded threaded.c
> Log:
> Exit the child main thread in make_child on child exit. This fixes a problem
> where the child main thread was looping in make_child() forking errant processes.
>
> Revision Changes Path
> 1.142 +3 -0 httpd-2.0/CHANGES
>
> Index: CHANGES
> ===================================================================
> RCS file: /home/cvs/httpd-2.0/CHANGES,v
> retrieving revision 1.141
> retrieving revision 1.142
> diff -u -r1.141 -r1.142
> --- CHANGES 2001/03/22 10:03:29 1.141
> +++ CHANGES 2001/03/22 19:29:05 1.142
> @@ -1,4 +1,7 @@
> Changes with Apache 2.0.15-dev
> + *) Fix bug in the Unix threaded.c MPM that allowed child processes
> + to fork() new child processes.
> + [Bill Stoddard]
>
> *) Fix a major security problem with double-reverse lookup checking.
> Previously, a client connecting over IPv4 would not be matched
>
>
>
> 1.13 +1 -1 httpd-2.0/server/mpm/threaded/threaded.c
>
> Index: threaded.c
> ===================================================================
> RCS file: /home/cvs/httpd-2.0/server/mpm/threaded/threaded.c,v
> retrieving revision 1.12
> retrieving revision 1.13
> diff -u -r1.12 -r1.13
> --- threaded.c 2001/03/05 20:15:15 1.12
> +++ threaded.c 2001/03/22 19:29:09 1.13
> @@ -762,7 +762,7 @@
> apr_signal(SIGTERM, just_die);
> child_main(slot);
>
> - return 0;
> + exit(0);
> }
> /* else */
> ap_scoreboard_image->parent[slot].pid = pid;
>
This is not cool. This isn't cleaning the child process correctly. Can
we please change this to ap_clean_child_exit()?
Ryan
_______________________________________________________________________________
Ryan Bloom rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------
Re: cvs commit: httpd-2.0/server/mpm/threaded threaded.c
Posted by Bill Stoddard <bi...@wstoddard.com>.
Good catch. I don't work on the Unix side of the house and missed this.
Changing it now.
Thanks
Bill
> > - return 0;
> > + exit(0);
> > }
> > /* else */
> > ap_scoreboard_image->parent[slot].pid = pid;
> >
>
> This is not cool. This isn't cleaning the child process correctly. Can
> we please change this to ap_clean_child_exit()?
>
> Ryan
>