summaryrefslogtreecommitdiffstats
path: root/plugins/runcmd.c
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2019-04-04 11:09:15 (GMT)
committerAndreas Baumann <mail@andreasbaumann.cc>2019-04-04 11:09:15 (GMT)
commit2f4d6764d78cf085601b34ac92486405bd11095d (patch)
tree550601dc79e74fd4c184dc96a95687d1d1238b43 /plugins/runcmd.c
parentfaea5899ba3264581bf75649e4b399d0b69bd125 (diff)
parent5f16ba81c4af1a05e67806ca989a1dd46248a5fd (diff)
downloadmonitoring-plugins-2f4d676.tar.gz
Merge branch 'master' into feature_check_curl
Diffstat (limited to 'plugins/runcmd.c')
-rw-r--r--plugins/runcmd.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/plugins/runcmd.c b/plugins/runcmd.c
index 1a7c904..c382867 100644
--- a/plugins/runcmd.c
+++ b/plugins/runcmd.c
@@ -67,19 +67,6 @@
67 * occur in any number of threads simultaneously. */ 67 * occur in any number of threads simultaneously. */
68static pid_t *np_pids = NULL; 68static pid_t *np_pids = NULL;
69 69
70/* Try sysconf(_SC_OPEN_MAX) first, as it can be higher than OPEN_MAX.
71 * If that fails and the macro isn't defined, we fall back to an educated
72 * guess. There's no guarantee that our guess is adequate and the program
73 * will die with SIGSEGV if it isn't and the upper boundary is breached. */
74#ifdef _SC_OPEN_MAX
75static long maxfd = 0;
76#elif defined(OPEN_MAX)
77# define maxfd OPEN_MAX
78#else /* sysconf macro unavailable, so guess (may be wildly inaccurate) */
79# define maxfd 256
80#endif
81
82
83/** prototypes **/ 70/** prototypes **/
84static int np_runcmd_open(const char *, int *, int *) 71static int np_runcmd_open(const char *, int *, int *)
85 __attribute__((__nonnull__(1, 2, 3))); 72 __attribute__((__nonnull__(1, 2, 3)));