summaryrefslogtreecommitdiffstats
path: root/plugins/utils.c
diff options
context:
space:
mode:
authorJan Wagner <waja@cyconet.org>2023-10-17 13:39:37 +0200
committerJan Wagner <waja@cyconet.org>2023-10-17 13:39:37 +0200
commit2a047014385022c8dc06dad4da0428db14898689 (patch)
tree00abea46325decf0c72870ee8f9ec1472e8e5344 /plugins/utils.c
parentf39211c26408af582121f519d89c8abf70e6d437 (diff)
parente23a75d954311b3be429a9020e4d317b89615ee7 (diff)
downloadmonitoring-plugins-2a04701.tar.gz
Merge branch 'master' of github.com:monitoring-plugins/monitoring-plugins
Diffstat (limited to 'plugins/utils.c')
-rw-r--r--plugins/utils.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/plugins/utils.c b/plugins/utils.c
index b4214c61..71c0bdd8 100644
--- a/plugins/utils.c
+++ b/plugins/utils.c
@@ -804,19 +804,3 @@ char *sperfdata_int (const char *label,
804 804
805 return data; 805 return data;
806} 806}
807
808int
809open_max (void)
810{
811 errno = 0;
812 if (maxfd > 0)
813 return(maxfd);
814
815 if ((maxfd = sysconf (_SC_OPEN_MAX)) < 0) {
816 if (errno == 0)
817 maxfd = DEFAULT_MAXFD; /* it's indeterminate */
818 else
819 die (STATE_UNKNOWN, _("sysconf error for _SC_OPEN_MAX\n"));
820 }
821 return(maxfd);
822}