summaryrefslogtreecommitdiffstats
path: root/tests/tcpflood.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-03-11 11:46:32 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2011-03-11 11:46:32 +0100
commitffa57b17b270be441c64161cd1a3c3123b58ee26 (patch)
treeeaec0a691437ffdb87795f4236a7e972b38ef746 /tests/tcpflood.c
parentfd26a42bdc04eaf497cafd9ef806a54f3de1a7e9 (diff)
parent9a53ec419e9d9e25a81b26a01ce5b035631e321a (diff)
downloadrsyslog-ffa57b17b270be441c64161cd1a3c3123b58ee26.tar.gz
rsyslog-ffa57b17b270be441c64161cd1a3c3123b58ee26.tar.xz
rsyslog-ffa57b17b270be441c64161cd1a3c3123b58ee26.zip
Merge branch 'v5-stable' into v5-beta
Conflicts: tests/Makefile.am
Diffstat (limited to 'tests/tcpflood.c')
-rw-r--r--tests/tcpflood.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/tcpflood.c b/tests/tcpflood.c
index a37845a3..3e7053c9 100644
--- a/tests/tcpflood.c
+++ b/tests/tcpflood.c
@@ -355,6 +355,7 @@ int main(int argc, char *argv[])
int ret = 0;
int opt;
struct sigaction sigAct;
+ struct rlimit maxFiles;
static char buf[1024];
srand(time(NULL)); /* seed is good enough for our needs */
@@ -431,6 +432,9 @@ int main(int argc, char *argv[])
maxFiles.rlim_max = numConnections + 20;
if(setrlimit(RLIMIT_NOFILE, &maxFiles) < 0) {
perror("setrlimit to increase file handles failed");
+ fprintf(stderr,
+ "could net set sufficiently large number of "
+ "open files for required connection count!\n");
exit(1);
}
}