summaryrefslogtreecommitdiffstats
path: root/tests/tcpflood.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-03-11 12:47:54 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2011-03-11 12:47:54 +0100
commitc509177c17288655f308ef68fb2cf7b005a83aed (patch)
tree00767733eac4341874da23bf881c22887ca11b4c /tests/tcpflood.c
parenta2cbbc1a87b36a335e570005fb4df38cb8d508ad (diff)
parent6dbd70732a19a13bacae7b4bea07097458974cc9 (diff)
downloadrsyslog-c509177c17288655f308ef68fb2cf7b005a83aed.tar.gz
rsyslog-c509177c17288655f308ef68fb2cf7b005a83aed.tar.xz
rsyslog-c509177c17288655f308ef68fb2cf7b005a83aed.zip
Merge branch 'v5-beta'
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 59c63d23..d72a4fe4 100644
--- a/tests/tcpflood.c
+++ b/tests/tcpflood.c
@@ -809,6 +809,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 */
@@ -928,6 +929,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);
}
}