Lines Matching refs:num_open

54 static struct rlimit num_open;  variable
68 for(num_open.rlim_cur = 0; in close_file_descriptors()
69 num_open.rlim_cur < num_open.rlim_max; in close_file_descriptors()
70 num_open.rlim_cur++) in close_file_descriptors()
71 if(testfd[num_open.rlim_cur] > 0) in close_file_descriptors()
72 close(testfd[num_open.rlim_cur]); in close_file_descriptors()
221 num_open.rlim_cur = NUM_NEEDED; in test_rlimit()
227 (rl.rlim_cur <= num_open.rlim_cur)) { in test_rlimit()
229 rlim2str(strbuff1, sizeof(strbuff1), num_open.rlim_cur); in test_rlimit()
251 num_open.rlim_max = sizeof(*memchunk) * nitems; in test_rlimit()
252 rlim2str(strbuff, sizeof(strbuff), num_open.rlim_max); in test_rlimit()
275 num_open.rlim_max = NUM_OPEN; in test_rlimit()
279 if((size_t)(num_open.rlim_max) > ((size_t)-1) / sizeof(*testfd)) { in test_rlimit()
280 rlim2str(strbuff1, sizeof(strbuff1), num_open.rlim_max); in test_rlimit()
291 rlim2str(strbuff, sizeof(strbuff), num_open.rlim_max); in test_rlimit()
294 testfd = malloc(sizeof(*testfd) * (size_t)(num_open.rlim_max)); in test_rlimit()
306 for(num_open.rlim_cur = 0; in test_rlimit()
307 num_open.rlim_cur < num_open.rlim_max; in test_rlimit()
308 num_open.rlim_cur++) in test_rlimit()
309 testfd[num_open.rlim_cur] = -1; in test_rlimit()
311 rlim2str(strbuff, sizeof(strbuff), num_open.rlim_max); in test_rlimit()
329 for(num_open.rlim_cur = 1; in test_rlimit()
330 num_open.rlim_cur < num_open.rlim_max; in test_rlimit()
331 num_open.rlim_cur++) { in test_rlimit()
333 testfd[num_open.rlim_cur] = dup(testfd[0]); in test_rlimit()
335 if(testfd[num_open.rlim_cur] < 0) { in test_rlimit()
337 testfd[num_open.rlim_cur] = -1; in test_rlimit()
339 rlim2str(strbuff1, sizeof(strbuff1), num_open.rlim_cur); in test_rlimit()
343 rlim2str(strbuff1, sizeof(strbuff1), num_open.rlim_cur); in test_rlimit()
348 num_open.rlim_max = NUM_NEEDED; in test_rlimit()
350 rlim2str(strbuff2, sizeof(strbuff2), num_open.rlim_max); in test_rlimit()
351 rlim2str(strbuff1, sizeof(strbuff1), num_open.rlim_cur); in test_rlimit()
357 for(num_open.rlim_cur = 0; in test_rlimit()
358 testfd[num_open.rlim_cur] >= 0; in test_rlimit()
359 num_open.rlim_cur++) in test_rlimit()
360 close(testfd[num_open.rlim_cur]); in test_rlimit()
368 rlim2str(strbuff, sizeof(strbuff), num_open.rlim_max); in test_rlimit()
384 num_open.rlim_cur = FD_SETSIZE - SAFETY_MARGIN; in test_rlimit()
385 if(num_open.rlim_max > num_open.rlim_cur) { in test_rlimit()
395 num_open.rlim_cur = FD_SETSIZE - SAFETY_MARGIN; in test_rlimit()
397 rl.rlim_cur < num_open.rlim_max; in test_rlimit()
400 ((unsigned int)testfd[rl.rlim_cur] > num_open.rlim_cur)) { in test_rlimit()
423 rlim2str(strbuff1, sizeof(strbuff1), num_open.rlim_max); in test_rlimit()