From 3a7ffc70d9beeeec58f68ba5a99d6333f5186b1f Mon Sep 17 00:00:00 2001 From: ume Date: Sun, 7 Jul 2002 18:19:48 +0000 Subject: Don't explicit kill of the process' own pid. PR: bin/38862 Submitted by: Martin Faxer with some modification MFC after: 1 week --- sbin/ping6/ping6.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'sbin/ping6') diff --git a/sbin/ping6/ping6.c b/sbin/ping6/ping6.c index 5ffc91a..d9f49b9 100644 --- a/sbin/ping6/ping6.c +++ b/sbin/ping6/ping6.c @@ -2144,13 +2144,12 @@ void onint(notused) int notused; { - summary(); + (void)signal(SIGINT, SIG_IGN); + (void)signal(SIGALRM, SIG_IGN); - (void)signal(SIGINT, SIG_DFL); - (void)kill(getpid(), SIGINT); + summary(); - /* NOTREACHED */ - exit(1); + exit(nreceived == 0); } /* -- cgit v1.1