summaryrefslogtreecommitdiffstats
path: root/sbin/ping
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2004-04-07 18:48:11 +0000
committeriedowse <iedowse@FreeBSD.org>2004-04-07 18:48:11 +0000
commite5237a493b31dc8ce4e974609be0a5484f1d859a (patch)
treede5a6c2366aa74ee9905b2660a562618b17e4cca /sbin/ping
parente301066937da660c2a0553e7d4bc9212b29468e6 (diff)
downloadFreeBSD-src-e5237a493b31dc8ce4e974609be0a5484f1d859a.zip
FreeBSD-src-e5237a493b31dc8ce4e974609be0a5484f1d859a.tar.gz
Don't turn off the regular SIGINFO status information. The use of
the NOKERNINFO flag only marginally de-clutters the output and has a number of unwanted side effects: o The kernel info might be what you want to see o ^T is left non-functional if ping is killed non-cleanly o "ping -q foo &" gets suspended on tty output Encouraged by: bde
Diffstat (limited to 'sbin/ping')
-rw-r--r--sbin/ping/ping.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c
index 8db4afe..613b9cc 100644
--- a/sbin/ping/ping.c
+++ b/sbin/ping/ping.c
@@ -93,7 +93,6 @@ __FBSDID("$FreeBSD$");
#include <stdlib.h>
#include <string.h>
#include <sysexits.h>
-#include <termios.h>
#include <unistd.h>
#define INADDR_LEN ((int)sizeof(in_addr_t))
@@ -185,7 +184,6 @@ double tsum = 0.0; /* sum of all times, for doing average */
double tsumsq = 0.0; /* sum of all times squared, for std. dev. */
volatile sig_atomic_t finish_up; /* nonzero if we've been told to finish up */
-int reset_kerninfo;
volatile sig_atomic_t siginfo_p;
static void fill(char *, char *);
@@ -216,7 +214,6 @@ main(argc, argv)
struct ip *ip;
struct msghdr msg;
struct sigaction si_sa;
- struct termios ts;
size_t sz;
u_char *datap, packet[IP_MAXPACKET];
char *ep, *source, *target, *payload;
@@ -708,12 +705,6 @@ main(argc, argv)
iov.iov_base = packet;
iov.iov_len = IP_MAXPACKET;
- if (tcgetattr(STDOUT_FILENO, &ts) != -1) {
- reset_kerninfo = !(ts.c_lflag & NOKERNINFO);
- ts.c_lflag |= NOKERNINFO;
- tcsetattr(STDOUT_FILENO, TCSANOW, &ts);
- }
-
if (preload == 0)
pinger(); /* send the first ping */
else {
@@ -1271,7 +1262,6 @@ check_status()
static void
finish()
{
- struct termios ts;
(void)signal(SIGINT, SIG_IGN);
(void)signal(SIGALRM, SIG_IGN);
@@ -1299,10 +1289,6 @@ finish()
"round-trip min/avg/max/stddev = %.3f/%.3f/%.3f/%.3f ms\n",
tmin, avg, tmax, sqrt(vari));
}
- if (reset_kerninfo && tcgetattr(STDOUT_FILENO, &ts) != -1) {
- ts.c_lflag &= ~NOKERNINFO;
- tcsetattr(STDOUT_FILENO, TCSANOW, &ts);
- }
if (nreceived)
exit(0);
OpenPOWER on IntegriCloud