1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

add more info to the stderr output

This commit is contained in:
Daniel Stenberg 2004-11-28 08:57:03 +00:00
parent a4752673bb
commit 0d7446c134

View File

@ -43,6 +43,10 @@
static int rlimit(void) static int rlimit(void)
{ {
struct rlimit rl; struct rlimit rl;
fprintf(stderr, "NUM_OPEN: %d\n", NUM_OPEN);
fprintf(stderr, "NUM_NEEDED: %d\n", NUM_NEEDED);
/* get open file limits */ /* get open file limits */
if (getrlimit(RLIMIT_NOFILE, &rl) == -1) { if (getrlimit(RLIMIT_NOFILE, &rl) == -1) {
fprintf(stderr, "warning: getrlimit: failed to get RLIMIT_NOFILE\n"); fprintf(stderr, "warning: getrlimit: failed to get RLIMIT_NOFILE\n");
@ -51,7 +55,8 @@ static int rlimit(void)
/* check that hard limit is high enough */ /* check that hard limit is high enough */
if (rl.rlim_max < NUM_NEEDED) { if (rl.rlim_max < NUM_NEEDED) {
fprintf(stderr, "warning: RLIMIT_NOFILE hard limit is too low\n"); fprintf(stderr, "warning: RLIMIT_NOFILE hard limit %d < %d\n",
(int)rl.rlim_max, NUM_NEEDED);
return -1; return -1;
} }