Lines Matching refs:testfd
51 static int *testfd = NULL; variable
69 if(testfd[num_open.rlim_cur] > 0) in close_file_descriptors()
70 close(testfd[num_open.rlim_cur]); in close_file_descriptors()
71 free(testfd); in close_file_descriptors()
72 testfd = NULL; in close_file_descriptors()
274 if((size_t)(num_open.rlim_max) > ((size_t)-1) / sizeof(*testfd)) {
290 testfd = malloc(sizeof(*testfd) * (size_t)(num_open.rlim_max));
291 if(!testfd) {
295 } while(num_open.rlim_max && !testfd);
296 if(!testfd) {
310 testfd[num_open.rlim_cur] = -1;
317 testfd[0] = open(DEV_NULL, O_RDONLY);
318 if(testfd[0] < 0) {
322 free(testfd);
323 testfd = NULL;
334 testfd[num_open.rlim_cur] = dup(testfd[0]);
336 if(testfd[num_open.rlim_cur] < 0) {
338 testfd[num_open.rlim_cur] = -1;
358 testfd[num_open.rlim_cur] >= 0;
360 close(testfd[num_open.rlim_cur]);
361 testfd[num_open.rlim_cur] = -1;
369 tmpfd = realloc(testfd, sizeof(*testfd) * (size_t)(num_open.rlim_max));
371 testfd = tmpfd;
410 if((testfd[rl.rlim_cur] > 0) &&
411 ((unsigned int)testfd[rl.rlim_cur] > num_open.rlim_cur)) {