summaryrefslogtreecommitdiffstats
path: root/plugins/check_ping.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_ping.c')
-rw-r--r--plugins/check_ping.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/check_ping.c b/plugins/check_ping.c
index 9ddc2529..211f74ef 100644
--- a/plugins/check_ping.c
+++ b/plugins/check_ping.c
@@ -103,8 +103,13 @@ main (int argc, char **argv)
103 usage4 (_("Cannot catch SIGALRM")); 103 usage4 (_("Cannot catch SIGALRM"));
104 } 104 }
105 105
106 /* handle timeouts gracefully */ 106 /* If ./configure finds ping has timeout values, set plugin alarm slightly
107 * higher so that we can use response from command line ping */
108#ifdef PING_PACKETS_FIRST && PING_HAS_TIMEOUT
107 alarm (timeout_interval + 1); 109 alarm (timeout_interval + 1);
110#else
111 alarm (timeout_interval);
112#endif
108 113
109 for (i = 0 ; i < n_addresses ; i++) { 114 for (i = 0 ; i < n_addresses ; i++) {
110 115