summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2002-07-07 18:19:48 +0000
committerume <ume@FreeBSD.org>2002-07-07 18:19:48 +0000
commit3a7ffc70d9beeeec58f68ba5a99d6333f5186b1f (patch)
treebcd88a952de8f68ade36364d8e6baf23d179b092
parente2d2e1db1f3fb3aefeccdc066a257eab9df30d30 (diff)
downloadFreeBSD-src-3a7ffc70d9beeeec58f68ba5a99d6333f5186b1f.zip
FreeBSD-src-3a7ffc70d9beeeec58f68ba5a99d6333f5186b1f.tar.gz
Don't explicit kill of the process' own pid.
PR: bin/38862 Submitted by: Martin Faxer <gmh003532@brfmasthugget.se> with some modification MFC after: 1 week
-rw-r--r--sbin/ping6/ping6.c9
1 files changed, 4 insertions, 5 deletions
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);
}
/*
OpenPOWER on IntegriCloud