Lines Matching refs:rl
127 struct rlimit rl; in test_rlimit() local
134 if(getrlimit(RLIMIT_NOFILE, &rl) != 0) { in test_rlimit()
142 rlim2str(strbuff, sizeof(strbuff), rl.rlim_cur); in test_rlimit()
145 rlim2str(strbuff, sizeof(strbuff), rl.rlim_max); in test_rlimit()
163 if(rl.rlim_cur != rl.rlim_max) { in test_rlimit()
166 if((rl.rlim_cur > 0) && in test_rlimit()
167 (rl.rlim_cur < OPEN_MAX)) { in test_rlimit()
169 rl.rlim_cur = OPEN_MAX; in test_rlimit()
170 if(setrlimit(RLIMIT_NOFILE, &rl) != 0) { in test_rlimit()
180 rl.rlim_cur = rl.rlim_max; in test_rlimit()
181 if(setrlimit(RLIMIT_NOFILE, &rl) != 0) { in test_rlimit()
190 if(getrlimit(RLIMIT_NOFILE, &rl) != 0) { in test_rlimit()
198 rlim2str(strbuff, sizeof(strbuff), rl.rlim_cur); in test_rlimit()
201 rlim2str(strbuff, sizeof(strbuff), rl.rlim_max); in test_rlimit()
223 if((rl.rlim_cur > 0) && in test_rlimit()
225 (rl.rlim_cur != RLIM_INFINITY) && in test_rlimit()
227 (rl.rlim_cur <= num_open.rlim_cur)) { in test_rlimit()
228 rlim2str(strbuff2, sizeof(strbuff2), rl.rlim_cur); in test_rlimit()
396 for(rl.rlim_cur = 0; in test_rlimit()
397 rl.rlim_cur < num_open.rlim_max; in test_rlimit()
398 rl.rlim_cur++) { in test_rlimit()
399 if((testfd[rl.rlim_cur] > 0) && in test_rlimit()
400 ((unsigned int)testfd[rl.rlim_cur] > num_open.rlim_cur)) { in test_rlimit()