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:
Dag-Erling Smørgrav committed 2026-06-23 17:20:38 +02:00
1 parent 276a3dacdb
commit 141bb85798
2 files changed
+2 -1

No files matched your search

+1 -1
View File
@@ -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,
+1
View File
@@ -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();