You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ben Laurie <be...@gonzo.ben.algroup.co.uk> on 1996/07/18 13:34:09 UTC
cvs commit: apache/src CHANGES conf.h http_main.c (fwd)
Seems to me that this patch should probably go into 1.1.2...
Cheers,
Ben.
Ben Laurie wrote:
> From heap.ben.algroup.co.uk!arachnet-fw.algroup.co.uk!taz.hyperreal.com!hyperreal.com!owner-apache-cvs Wed Jul 17 23:35:58 1996
> Date: Wed, 17 Jul 1996 16:20:53 -0700
> From: Ben Laurie <be...@hyperreal.com>
> Message-Id: <19...@taz.hyperreal.com>
> To: apache-cvs@hyperreal.com
> Subject: cvs commit: apache/src CHANGES conf.h http_main.c
> Sender: owner-apache-cvs@hyperreal.com
> Precedence: bulk
>
> ben 96/07/17 16:20:52
>
> Modified: src CHANGES conf.h http_main.c
> Log:
> Work around broken wait() behaviour in Irix (and perhaps others).
>
> Revision Changes Path
> 1.44 +4 -0 apache/src/CHANGES
>
> Index: CHANGES
> ===================================================================
> RCS file: /export/home/cvs/apache/src/CHANGES,v
> retrieving revision 1.43
> retrieving revision 1.44
> diff -C3 -r1.43 -r1.44
> *** CHANGES 1996/07/17 08:33:40 1.43
> --- CHANGES 1996/07/17 23:20:47 1.44
> ***************
> *** 6,11 ****
> --- 6,15 ----
> *) Graceful restart code added. This allows the server to restart without
> losing current connections on receipt of signal 2 (SIGINT). [Ben Laurie]
>
> + *) Added BROKEN_WAIT flag to conf.h, to be used on systems which fail to
> + reap their children correctly (symptom: mod_status shows children which
> + don't exist). [Ben Laurie]
> +
> Changes with Apache 1.1.1:
>
> *) Fixed bug where Cookie module would make two entries in the
>
>
>
> 1.22 +1 -0 apache/src/conf.h
>
> Index: conf.h
> ===================================================================
> RCS file: /export/home/cvs/apache/src/conf.h,v
> retrieving revision 1.21
> retrieving revision 1.22
> diff -C3 -r1.21 -r1.22
> *** conf.h 1996/07/17 15:09:58 1.21
> --- conf.h 1996/07/17 23:20:49 1.22
> ***************
> *** 94,99 ****
> --- 94,100 ----
> #define HAVE_SHMGET
> #define HAVE_CRYPT_H
> #define NO_LONG_DOUBLE
> + #define BROKEN_WAIT
>
> #elif defined(HPUX) || defined(HPUX10)
> #define HAVE_RESOURCE
>
>
>
> 1.51 +29 -2 apache/src/http_main.c
>
> Index: http_main.c
> ===================================================================
> RCS file: /export/home/cvs/apache/src/http_main.c,v
> retrieving revision 1.50
> retrieving revision 1.51
> diff -C3 -r1.50 -r1.51
> *** http_main.c 1996/07/16 22:14:54 1.50
> --- http_main.c 1996/07/17 23:20:50 1.51
> ***************
> *** 937,945 ****
> #endif
> }
>
> int wait_or_timeout (int *status)
> {
> ! wait_or_timeout_retval = -1;
>
> #if defined(NEXT)
> if (setjmp(wait_timeout_buf) != 0) {
> --- 937,966 ----
> #endif
> }
>
> + #ifdef BROKEN_WAIT
> + /*
> + Some systems appear to fail to deliver dead children to wait() at times.
> + This sorts them out.
> + */
> + void reap_children()
> + {
> + int status,n;
> +
> + for(n=0 ; n < HARD_SERVER_LIMIT ; ++n)
> + if(scoreboard_image->servers[n].status != SERVER_DEAD
> + && waitpid(scoreboard_image->servers[n].pid,&status,WNOHANG) == -1
> + && errno == ECHILD)
> + {
> + sync_scoreboard_image();
> + update_child_status(n,SERVER_DEAD,NULL);
> + }
> + }
> + #endif
> +
> int wait_or_timeout (int *status)
> {
> ! int wait_or_timeout_retval = -1;
> ! static int ntimes;
>
> #if defined(NEXT)
> if (setjmp(wait_timeout_buf) != 0) {
> ***************
> *** 949,955 ****
> errno = ETIMEDOUT;
> return wait_or_timeout_retval;
> }
> !
> signal (SIGALRM, longjmp_out_of_alarm);
> alarm(1);
> #if defined(NEXT)
> --- 970,982 ----
> errno = ETIMEDOUT;
> return wait_or_timeout_retval;
> }
> ! #ifdef BROKEN_WAIT
> ! if(++ntimes == 60)
> ! {
> ! reap_children();
> ! ntimes=0;
> ! }
> ! #endif
> signal (SIGALRM, longjmp_out_of_alarm);
> alarm(1);
> #if defined(NEXT)
>
>
>
--
Ben Laurie Phone: +44 (181) 994 6435
Freelance Consultant and Fax: +44 (181) 994 6472
Technical Director Email: ben@algroup.co.uk
A.L. Digital Ltd, URL: http://www.algroup.co.uk
London, England. Apache Group member (http://www.apache.org)