You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ian Holsman <ia...@cnet.com> on 2001/06/16 01:15:25 UTC
[Patch] Make AB work under Win2K
The patch fixes 2 things.
* apr_terminate now has the right declaration so it can be used directly
in atexit
* Win2K gets a divde by zero error when heartbeatres is zero (reproduce via
support\Debug\ab.exe -k -c 6 -n 100 localhost/
..Ian
Index: ab.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/support/ab.c,v
retrieving revision 1.70
diff -u -r1.70 ab.c
--- ab.c 2001/04/12 07:34:17 1.70
+++ ab.c 2001/06/15 23:10:26
@@ -1079,10 +1079,12 @@
}
if (done < requests) {
struct data s;
- if ((done) && (!(done % heartbeatres))) {
- fprintf(stderr, "Completed %ld requests\n", done);
- fflush(stderr);
- }
+ if (done) {
+ if ((heartbeatres >0) && !(done % heartbeatres)) {
+ fprintf(stderr, "Completed %ld requests\n", done);
+ fflush(stderr);
+ }
+ }
c->done = apr_time_now();
s.read = c->read;
s.starttime = c->start;
@@ -1438,10 +1440,6 @@
return 0;
}
-static void terminate(void)
-{
- apr_terminate();
-}
/* ------------------------------------------------------- */
@@ -1465,7 +1463,7 @@
hdrs[0] = '\0';
apr_initialize();
- atexit(terminate);
+ atexit(apr_terminate);
apr_pool_create(&cntxt, NULL);
#ifdef NOT_ASCII
Re: [Patch] Make AB work under Win2K
Posted by Jeff Trawick <tr...@attglobal.net>.
Ian Holsman <ia...@cnet.com> writes:
> The patch fixes 2 things.
> * apr_terminate now has the right declaration so it can be used
> directly in atexit
> * Win2K gets a divde by zero error when heartbeatres is zero (reproduce via
> support\Debug\ab.exe -k -c 6 -n 100 localhost/
this feature worked everywhere AFAICT
Committed... thanks as always!
--
Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
http://www.geocities.com/SiliconValley/Park/9289/
Born in Roswell... married an alien...