fd-util: export get_max_fd() so that we can use it in tests
This commit is contained in:
+1
-1
@@ -187,7 +187,7 @@ _pure_ static bool fd_in_set(int fd, const int fdset[], size_t n_fdset) {
|
||||
return false;
|
||||
}
|
||||
|
||||
static int get_max_fd(void) {
|
||||
int get_max_fd(void) {
|
||||
struct rlimit rl;
|
||||
rlim_t m;
|
||||
|
||||
|
||||
@@ -57,6 +57,8 @@ DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(DIR*, closedir, NULL);
|
||||
int fd_nonblock(int fd, bool nonblock);
|
||||
int fd_cloexec(int fd, bool cloexec);
|
||||
|
||||
int get_max_fd(void);
|
||||
|
||||
int close_all_fds(const int except[], size_t n_except);
|
||||
int close_all_fds_without_malloc(const int except[], size_t n_except);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user