summaryrefslogtreecommitdiff
path: root/support
diff options
context:
space:
mode:
authorArno Töll <arno@debian.org>2014-07-20 06:23:00 -1100
committerArno Töll <arno@debian.org>2014-07-20 06:23:00 -1100
commitcb35beef2a938b80c9e4b5d6a408eca437aa74db (patch)
tree87ae6e0d2b3a8ce318fe8ab559494808a451035e /support
parent2a463b3cd73c32ee9dcd508248d0194923f435f4 (diff)
downloadapache2-cb35beef2a938b80c9e4b5d6a408eca437aa74db.tar.gz
Imported Upstream version 2.4.10
Diffstat (limited to 'support')
-rw-r--r--support/ab.c17
-rw-r--r--support/rotatelogs.c5
2 files changed, 16 insertions, 6 deletions
diff --git a/support/ab.c b/support/ab.c
index 13041505..2bb7eef3 100644
--- a/support/ab.c
+++ b/support/ab.c
@@ -266,14 +266,14 @@ struct data {
int verbosity = 0; /* no verbosity by default */
int recverrok = 0; /* ok to proceed after socket receive errors */
-enum {NO_METH = 0, GET, HEAD, PUT, POST} method = NO_METH;
-const char *method_str[] = {"bug", "GET", "HEAD", "PUT", "POST"};
+enum {NO_METH = 0, GET, HEAD, PUT, POST, CUSTOM_METHOD} method = NO_METH;
+const char *method_str[] = {"bug", "GET", "HEAD", "PUT", "POST", ""};
int send_body = 0; /* non-zero if sending body with request */
int requests = 1; /* Number of requests to make */
int heartbeatres = 100; /* How often do we say we're alive */
int concurrency = 1; /* Number of multiple requests to make */
int percentile = 1; /* Show percentile served */
-int nolength = 0; /* Accept variable document length */
+int nolength = 0; /* Accept variable document length */
int confidence = 1; /* Show confidence estimator and warnings */
int tlimit = 0; /* time limit in secs */
int keepalive = 0; /* try and do keepalive connections */
@@ -1888,14 +1888,14 @@ static void test(void)
static void copyright(void)
{
if (!use_html) {
- printf("This is ApacheBench, Version %s\n", AP_AB_BASEREVISION " <$Revision: 1554214 $>");
+ printf("This is ApacheBench, Version %s\n", AP_AB_BASEREVISION " <$Revision: 1604373 $>");
printf("Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/\n");
printf("Licensed to 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><br>\n", AP_AB_BASEREVISION, "$Revision: 1554214 $");
+ printf(" This is ApacheBench, Version %s <i>&lt;%s&gt;</i><br>\n", AP_AB_BASEREVISION, "$Revision: 1604373 $");
printf(" Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/<br>\n");
printf(" Licensed to The Apache Software Foundation, http://www.apache.org/<br>\n");
printf("</p>\n<p>\n");
@@ -1949,6 +1949,7 @@ static void usage(const char *progname)
fprintf(stderr, " -g filename Output collected data to gnuplot format file.\n");
fprintf(stderr, " -e filename Output CSV file with percentages served\n");
fprintf(stderr, " -r Don't exit on socket receive errors.\n");
+ fprintf(stderr, " -m method Method name\n");
fprintf(stderr, " -h Display usage information (this message)\n");
#ifdef USE_SSL
@@ -2127,7 +2128,7 @@ int main(int argc, const char * const argv[])
myhost = NULL; /* 0.0.0.0 or :: */
apr_getopt_init(&opt, cntxt, argc, argv);
- while ((status = apr_getopt(opt, "n:c:t:s:b:T:p:u:v:lrkVhwix:y:z:C:H:P:A:g:X:de:SqB:"
+ while ((status = apr_getopt(opt, "n:c:t:s:b:T:p:u:v:lrkVhwix:y:z:C:H:P:A:g:X:de:SqB:m:"
#ifdef USE_SSL
"Z:f:"
#endif
@@ -2300,6 +2301,10 @@ int main(int argc, const char * const argv[])
case 'Z':
ssl_cipher = strdup(opt_arg);
break;
+ case 'm':
+ method = CUSTOM_METHOD;
+ method_str[CUSTOM_METHOD] = strdup(opt_arg);
+ break;
case 'f':
if (strncasecmp(opt_arg, "ALL", 3) == 0) {
meth = SSLv23_client_method();
diff --git a/support/rotatelogs.c b/support/rotatelogs.c
index cf1eac1e..c2373f56 100644
--- a/support/rotatelogs.c
+++ b/support/rotatelogs.c
@@ -24,6 +24,7 @@
#include "apr_time.h"
#include "apr_getopt.h"
#include "apr_thread_proc.h"
+#include "apr_signal.h"
#if APR_FILES_AS_SOCKETS
#include "apr_poll.h"
#endif
@@ -557,6 +558,10 @@ int main (int argc, const char * const argv[])
break;
case 'p':
config.postrotate_prog = opt_arg;
+#ifdef SIGCHLD
+ /* Prevent creation of zombies (on modern Unix systems). */
+ apr_signal(SIGCHLD, SIG_IGN);
+#endif
break;
case 'f':
config.force_open = 1;