Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/ping Correct nokerninfo tty flag being left set in most...
details: https://anonhg.NetBSD.org/src/rev/7bae0f94e474
branches: trunk
changeset: 471983:7bae0f94e474
user: mjl <mjl%NetBSD.org@localhost>
date: Sat Apr 17 01:17:15 1999 +0000
description:
Correct nokerninfo tty flag being left set in most error cases.
Closes PR/7388 by Dave Huang <khym%bga.com@localhost>.
diffstat:
sbin/ping/ping.c | 20 +++++++++++---------
1 files changed, 11 insertions(+), 9 deletions(-)
diffs (48 lines):
diff -r ff991c596478 -r 7bae0f94e474 sbin/ping/ping.c
--- a/sbin/ping/ping.c Sat Apr 17 00:01:18 1999 +0000
+++ b/sbin/ping/ping.c Sat Apr 17 01:17:15 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ping.c,v 1.47 1999/03/08 01:16:20 sommerfe Exp $ */
+/* $NetBSD: ping.c,v 1.48 1999/04/17 01:17:15 mjl Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -62,7 +62,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: ping.c,v 1.47 1999/03/08 01:16:20 sommerfe Exp $");
+__RCSID("$NetBSD: ping.c,v 1.48 1999/04/17 01:17:15 mjl Exp $");
#endif
#include <stdio.h>
@@ -241,13 +241,6 @@
#endif
-#if defined(SIGINFO) && defined(NOKERNINFO)
- if (tcgetattr (0, &ts) != -1) {
- reset_kerninfo = !(ts.c_lflag & NOKERNINFO);
- ts.c_lflag |= NOKERNINFO;
- tcsetattr (0, TCSANOW, &ts);
- }
-#endif
#ifdef sgi
__progname = argv[0];
#endif
@@ -499,6 +492,15 @@
(char*)&bufspace, sizeof(bufspace));
(void)signal(SIGINT, prefinish);
+
+#if defined(SIGINFO) && defined(NOKERNINFO)
+ if (tcgetattr (0, &ts) != -1) {
+ reset_kerninfo = !(ts.c_lflag & NOKERNINFO);
+ ts.c_lflag |= NOKERNINFO;
+ tcsetattr (0, TCSANOW, &ts);
+ }
+#endif
+
#ifdef SIGINFO
(void)signal(SIGINFO, prtsig);
#else
Home |
Main Index |
Thread Index |
Old Index