summaryrefslogtreecommitdiffstats
path: root/plugins-root/check_icmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins-root/check_icmp.c')
-rw-r--r--plugins-root/check_icmp.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/plugins-root/check_icmp.c b/plugins-root/check_icmp.c
index 7360b435..55405b8a 100644
--- a/plugins-root/check_icmp.c
+++ b/plugins-root/check_icmp.c
@@ -431,8 +431,7 @@ check_icmp_config_wrapper process_arguments(int argc, char **argv) {
431 } 431 }
432 break; 432 break;
433 case 't': 433 case 't':
434 timeout = (unsigned int)strtoul(optarg, NULL, 0); 434 // WARNING Deprecated since execution time is determined by the other factors
435 // TODO die here and complain about wrong input
436 break; 435 break;
437 case 'H': { 436 case 'H': {
438 add_host_wrapper host_add_result = 437 add_host_wrapper host_add_result =
@@ -895,21 +894,6 @@ int main(int argc, char **argv) {
895 } 894 }
896 } 895 }
897 896
898 struct sigaction sig_action;
899 sig_action.sa_handler = NULL;
900 sig_action.sa_sigaction = check_icmp_timeout_handler;
901 sigfillset(&sig_action.sa_mask);
902 sig_action.sa_flags = SA_NODEFER | SA_RESTART | SA_SIGINFO;
903
904 sigaction(SIGINT, &sig_action, NULL);
905 sigaction(SIGHUP, &sig_action, NULL);
906 sigaction(SIGTERM, &sig_action, NULL);
907 sigaction(SIGALRM, &sig_action, NULL);
908 if (debug) {
909 printf("Setting alarm timeout to %u seconds\n", timeout);
910 }
911 alarm(timeout);
912
913 /* make sure we don't wait any longer than necessary */ 897 /* make sure we don't wait any longer than necessary */
914 struct timeval prog_start; 898 struct timeval prog_start;
915 gettimeofday(&prog_start, NULL); 899 gettimeofday(&prog_start, NULL);