diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2006-04-13 00:49:16 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2006-04-13 00:49:16 +0000 |
commit | fc136bbab2d84700a4655e5e586ae70c67e1795b (patch) | |
tree | 97af7cd0b700e54af35d23652b788ac6a2ff3aa9 /sbin/ping | |
parent | e3257453e0ffa88026e085670a61d00b6638eab4 (diff) |
fix more signal races; ok moritz
Diffstat (limited to 'sbin/ping')
-rw-r--r-- | sbin/ping/ping.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c index d5a59337a2a..9a361e8a7fa 100644 --- a/sbin/ping/ping.c +++ b/sbin/ping/ping.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ping.c,v 1.76 2006/04/10 08:05:13 deraadt Exp $ */ +/* $OpenBSD: ping.c,v 1.77 2006/04/13 00:49:15 deraadt Exp $ */ /* $NetBSD: ping.c,v 1.20 1995/08/11 22:37:58 cgd Exp $ */ /* @@ -43,7 +43,7 @@ static const char copyright[] = #if 0 static char sccsid[] = "@(#)ping.c 8.1 (Berkeley) 6/5/93"; #else -static const char rcsid[] = "$OpenBSD: ping.c,v 1.76 2006/04/10 08:05:13 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: ping.c,v 1.77 2006/04/13 00:49:15 deraadt Exp $"; #endif #endif /* not lint */ @@ -572,7 +572,6 @@ catcher(int signo) /* * Print statistics when SIGINFO is received. - * XXX not race safe */ /* ARGSUSED */ void @@ -907,13 +906,13 @@ in_cksum(u_short *addr, int len) } void -summary(int header, int sig) +summary(int header, int insig) { char buf[8192], buft[8192]; buf[0] = '\0'; - if (!sig) { + if (!insig) { (void)putchar('\r'); (void)fflush(stdout); } else @@ -988,7 +987,7 @@ finish(int signo) { (void)signal(SIGINT, SIG_IGN); - summary(1, 0); + summary(1, signo); if (signo) _exit(nreceived ? 0 : 1); else |