aboutsummaryrefslogtreecommitdiff
path: root/networking/arping.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/arping.c')
-rw-r--r--networking/arping.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/networking/arping.c b/networking/arping.c
index c89b97567..2277ec55e 100644
--- a/networking/arping.c
+++ b/networking/arping.c
@@ -377,18 +377,8 @@ int arping_main(int argc, char **argv)
377 printf(" from %s via %s\n", inet_ntoa(src), device); 377 printf(" from %s via %s\n", inet_ntoa(src), device);
378 } 378 }
379 379
380 { 380 signal_SA_RESTART_empty_mask(SIGINT, (void (*)(int))finish);
381 struct sigaction sa; 381 signal_SA_RESTART_empty_mask(SIGALRM, (void (*)(int))catcher);
382
383 memset(&sa, 0, sizeof(sa));
384 sa.sa_flags = SA_RESTART;
385
386 sa.sa_handler = (void (*)(int)) finish;
387 sigaction(SIGINT, &sa, NULL);
388
389 sa.sa_handler = (void (*)(int)) catcher;
390 sigaction(SIGALRM, &sa, NULL);
391 }
392 382
393 catcher(); 383 catcher();
394 384