Fixed backgrounding of ping, which was broken by the ^T changes in rev.1.3.
This commit is contained in:
parent
d58e2ca341
commit
2ceaae21e9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=19395
@ -176,10 +176,10 @@ main(argc, argv)
|
|||||||
setuid(getuid());
|
setuid(getuid());
|
||||||
|
|
||||||
preload = 0;
|
preload = 0;
|
||||||
if (tcgetattr (0, &ts) != -1) {
|
if (tcgetattr(STDOUT_FILENO, &ts) != -1) {
|
||||||
reset_kerninfo = !(ts.c_lflag & NOKERNINFO);
|
reset_kerninfo = !(ts.c_lflag & NOKERNINFO);
|
||||||
ts.c_lflag |= NOKERNINFO;
|
ts.c_lflag |= NOKERNINFO;
|
||||||
tcsetattr (0, TCSANOW, &ts);
|
tcsetattr(STDOUT_FILENO, TCSANOW, &ts);
|
||||||
}
|
}
|
||||||
|
|
||||||
datap = &outpack[8 + sizeof(struct timeval)];
|
datap = &outpack[8 + sizeof(struct timeval)];
|
||||||
@ -787,9 +787,9 @@ finish()
|
|||||||
(void)printf("round-trip min/avg/max = %.3f/%.3f/%.3f ms\n",
|
(void)printf("round-trip min/avg/max = %.3f/%.3f/%.3f ms\n",
|
||||||
tmin, ((double)i) / 1000.0, tmax);
|
tmin, ((double)i) / 1000.0, tmax);
|
||||||
}
|
}
|
||||||
if (reset_kerninfo && tcgetattr (0, &ts) != -1) {
|
if (reset_kerninfo && tcgetattr(STDOUT_FILENO, &ts) != -1) {
|
||||||
ts.c_lflag &= ~NOKERNINFO;
|
ts.c_lflag &= ~NOKERNINFO;
|
||||||
tcsetattr (0, TCSANOW, &ts);
|
tcsetattr(STDOUT_FILENO, TCSANOW, &ts);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nreceived)
|
if (nreceived)
|
||||||
|
Loading…
Reference in New Issue
Block a user