mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-29 11:54:38 +01:00
ping: Flush stdout after printing initial status
MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57765
This commit is contained in:
1 parent
276a3dacdb
commit
141bb85798
2 files changed
+2
-1
No files matched your search
+1
-1
@@ -829,7 +829,6 @@ ping(int argc, char *const *argv)
|
||||
sweepmin, sweepmax);
|
||||
else
|
||||
(void)printf(": %d data bytes\n", datalen);
|
||||
|
||||
} else {
|
||||
if (sweepmax)
|
||||
(void)printf("PING %s: (%d ... %d) data bytes\n",
|
||||
@@ -837,6 +836,7 @@ ping(int argc, char *const *argv)
|
||||
else
|
||||
(void)printf("PING %s: %d data bytes\n", hostname, datalen);
|
||||
}
|
||||
(void)fflush(stdout);
|
||||
|
||||
/*
|
||||
* Use sigaction() instead of signal() to get unambiguous semantics,
|
||||
|
||||
@@ -1114,6 +1114,7 @@ ping6(int argc, char *argv[])
|
||||
(unsigned long)(pingerlen() - 8));
|
||||
printf("%s --> ", pr_addr((struct sockaddr *)&src, sizeof(src)));
|
||||
printf("%s\n", pr_addr((struct sockaddr *)&dst, sizeof(dst)));
|
||||
fflush(stdout);
|
||||
|
||||
if (preload == 0)
|
||||
pinger();
|
||||
|
||||
Reference in new issue
Block a user