diff options
author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2023-10-15 20:07:33 (GMT) |
---|---|---|
committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2023-10-15 20:07:33 (GMT) |
commit | 685c2931dfc3cb67b7605eba143598512a66c037 (patch) | |
tree | 4d73bf71eb19e7c63f3d649fa969c63104a4b456 /plugins/common.h | |
parent | 0875351a8385d6587133c2af541d102f31c17a46 (diff) | |
parent | bf70f5f847e3407af572d1768cca747af270b993 (diff) | |
download | monitoring-plugins-685c2931dfc3cb67b7605eba143598512a66c037.tar.gz |
Merge branch 'master' into dev/check_ssh-patches
Diffstat (limited to 'plugins/common.h')
-rw-r--r-- | plugins/common.h | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/plugins/common.h b/plugins/common.h index 0f08e2f..6bf4fca 100644 --- a/plugins/common.h +++ b/plugins/common.h | |||
@@ -225,18 +225,4 @@ enum { | |||
225 | # define __attribute__(x) /* do nothing */ | 225 | # define __attribute__(x) /* do nothing */ |
226 | #endif | 226 | #endif |
227 | 227 | ||
228 | /* Try sysconf(_SC_OPEN_MAX) first, as it can be higher than OPEN_MAX. | ||
229 | * If that fails and the macro isn't defined, we fall back to an educated | ||
230 | * guess. There's no guarantee that our guess is adequate and the program | ||
231 | * will die with SIGSEGV if it isn't and the upper boundary is breached. */ | ||
232 | #define DEFAULT_MAXFD 256 /* fallback value if no max open files value is set */ | ||
233 | #define MAXFD_LIMIT 8192 /* upper limit of open files */ | ||
234 | #ifdef _SC_OPEN_MAX | ||
235 | static long maxfd = 0; | ||
236 | #elif defined(OPEN_MAX) | ||
237 | # define maxfd OPEN_MAX | ||
238 | #else /* sysconf macro unavailable, so guess (may be wildly inaccurate) */ | ||
239 | # define maxfd DEFAULT_MAXFD | ||
240 | #endif | ||
241 | |||
242 | #endif /* _COMMON_H_ */ | 228 | #endif /* _COMMON_H_ */ |