]> granicus.if.org Git - apache/commitdiff
added check on apr_pollset_create() return value to exit ab it case it fails.
authorJean-Jacques Clar <clar@apache.org>
Tue, 16 Mar 2004 16:57:02 +0000 (16:57 +0000)
committerJean-Jacques Clar <clar@apache.org>
Tue, 16 Mar 2004 16:57:02 +0000 (16:57 +0000)
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

support/ab.c

index 60b986fb6b87a108fa4e300a62c822e5151719eb..0e7f808b5637e2a2b925994a71b8f5446afaef2a 100644 (file)
@@ -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("<p>\n");
-       printf(" This is ApacheBench, Version %s <i>&lt;%s&gt;</i> apache-2.0<br>\n", AP_AB_BASEREVISION, "$Revision: 1.137 $");
+       printf(" This is ApacheBench, Version %s <i>&lt;%s&gt;</i> apache-2.0<br>\n", AP_AB_BASEREVISION, "$Revision: 1.138 $");
        printf(" Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/<br>\n");
        printf(" Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/<br>\n");
        printf("</p>\n<p>\n");