summaryrefslogtreecommitdiff
path: root/tests/tcpflood.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2011-03-26 19:16:55 +0100
committerMichael Biebl <biebl@debian.org>2011-03-26 19:16:55 +0100
commitdea543841bb1f1c46586a68da21d55b44c6bf158 (patch)
tree46dd88ab15d5da40adae5ca8748f73e079df979a /tests/tcpflood.c
parenta362b3333f84518889cefc1706d4e6adaa92888c (diff)
downloadrsyslog-dea543841bb1f1c46586a68da21d55b44c6bf158.tar.gz
Imported Upstream version 5.7.9upstream/5.7.9
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 a37845a..3e7053c 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);
}
}