You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by cl...@apache.org on 2004/03/16 17:57:02 UTC
cvs commit: httpd-2.0/support ab.c
clar 2004/03/16 08:57:02
Modified: support ab.c
Log:
added check on apr_pollset_create() return value to exit ab it case it fails.
On NetWare using a concurrency higher than 64 is segfaulting because of FD_SETSIZE as a value of 64.
Revision Changes Path
1.138 +7 -3 httpd-2.0/support/ab.c
Index: ab.c
===================================================================
RCS file: /home/cvs/httpd-2.0/support/ab.c,v
retrieving revision 1.137
retrieving revision 1.138
diff -u -r1.137 -r1.138
--- ab.c 9 Feb 2004 20:40:52 -0000 1.137
+++ ab.c 16 Mar 2004 16:57:02 -0000 1.138
@@ -1559,7 +1559,11 @@
con = calloc(concurrency * sizeof(struct connection), 1);
stats = calloc(requests * sizeof(struct data), 1);
- apr_pollset_create(&readbits, concurrency, cntxt, 0);
+
+ if ((status = apr_pollset_create(&readbits, concurrency, cntxt, 0)) != APR_SUCCESS) {
+ fprintf(stderr, "\napr_pollset_create failed: %d\n", status);
+ exit(status);
+ }
/* setup request */
if (posting <= 0) {
Re: cvs commit: httpd-2.0/support ab.c
Posted by Jeff Trawick <tr...@attglobal.net>.
clar@apache.org wrote:
> clar 2004/03/16 08:57:02
>
> Modified: support ab.c
> Log:
> added check on apr_pollset_create() return value to exit ab it case it fails.
> On NetWare using a concurrency higher than 64 is segfaulting because of FD_SETSIZE as a value of 64.
Index: ab.c
> - apr_pollset_create(&readbits, concurrency, cntxt, 0);
> +
> + if ((status = apr_pollset_create(&readbits, concurrency, cntxt, 0)) != APR_SUCCESS) {
> + fprintf(stderr, "\napr_pollset_create failed: %d\n", status);
> + exit(status);
> + }
your change is obviously a vast improvement, but what about
if ("it failed") {
apr_err("apr_pollset_create failed", status);
}