From: Jean-Jacques Clar Date: Tue, 16 Mar 2004 16:57:02 +0000 (+0000) Subject: added check on apr_pollset_create() return value to exit ab it case it fails. X-Git-Tag: pre_ajp_proxy~513 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9cc9ba0aca65e0f46e5817269bf54ccc9460897c;p=apache 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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102990 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/support/ab.c b/support/ab.c index 60b986fb6b..0e7f808b56 100644 --- a/support/ab.c +++ b/support/ab.c @@ -1559,7 +1559,11 @@ static void test(void) 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) { @@ -1782,14 +1786,14 @@ static void test(void) static void copyright(void) { if (!use_html) { - printf("This is ApacheBench, Version %s\n", AP_AB_BASEREVISION " <$Revision: 1.137 $> apache-2.0"); + printf("This is ApacheBench, Version %s\n", AP_AB_BASEREVISION " <$Revision: 1.138 $> apache-2.0"); printf("Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/\n"); printf("Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/\n"); printf("\n"); } else { printf("

\n"); - printf(" This is ApacheBench, Version %s <%s> apache-2.0
\n", AP_AB_BASEREVISION, "$Revision: 1.137 $"); + printf(" This is ApacheBench, Version %s <%s> apache-2.0
\n", AP_AB_BASEREVISION, "$Revision: 1.138 $"); printf(" Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
\n"); printf(" Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
\n"); printf("

\n

\n");