/* Check the FDs that are currently open */
static int check_open_fd()
{
+#ifndef HAVE_WIN32
int max_fd = 0;
struct dirent *entry;
DIR *dir = opendir(PROC_SELF_FD);
}
closedir(dir);
return max_fd;
+#endif
+ return -1;
}
static int bclose_proc_self(int start_fd)
/* Many systems doesn't have the correct system call
* to determine the FD list to close.
*/
+#if !defined(HAVE_FCNTL_F_CLOSEM) && !defined(HAVE_CLOSEFROM) && !defined(HAVE_WIN32)
struct rlimit rl;
int64_t rlimitResult=0;
close(i);
}
return 4;
+#endif
+ return 5;
}
#ifdef TEST_PROGRAM