This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".
The branch, master has been updated
via 4858b4e340b83c545aa5f161bb80a1433bee7886 (commit)
from c824b6fb9c636ab89f71ee69c3dd81dff2483fc5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=4858b4e340b83c545aa5f161bb80a1433bee7886
commit 4858b4e340b83c545aa5f161bb80a1433bee7886
Author: Guillem Jover <[email protected]>
Date: Wed May 13 22:29:12 2015 +0200
ping, ping6: Always use line buffered output.
Standard behaviour is to use line buffered output
even when redirecting output in a pipe.
diff --git a/ChangeLog b/ChangeLog
index 28c7540..02edeac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2015-05-13 Guillem Jover <[email protected]>
+
+ ping, ping6: Always use line buffered output.
+ When stdout is redirected, libc will change the stream to
+ be fully buffered. Suppress this, gaining the standard
+ behaviour of other implementations. Issue was first reported
+ as a wishlist bug of Debian: https://bugs.debian.org/782727.
+
+ * ping/ping.c (main): Request line buffering on stdout, adding
+ a call to setvbuf().
+ * ping/ping6.c (main): Likewise.
+
2015-05-12 Alfred M. Szmidt <[email protected]>
* bootstrap.conf (gnulib_modules): Add announce-gen.
diff --git a/ping/ping.c b/ping/ping.c
index 3f939dc..091e070 100644
--- a/ping/ping.c
+++ b/ping/ping.c
@@ -295,6 +295,9 @@ main (int argc, char **argv)
/* Reset root privileges */
setuid (getuid ());
+ /* Force line buffering regardless of output device. */
+ setvbuf (stdout, NULL, _IOLBF, 0);
+
argv += index;
argc -= index;
diff --git a/ping/ping6.c b/ping/ping6.c
index 9d7609e..b0e0bf1 100644
--- a/ping/ping6.c
+++ b/ping/ping6.c
@@ -254,6 +254,9 @@ main (int argc, char **argv)
/* Reset root privileges */
setuid (getuid ());
+ /* Force line buffering regardless of output device. */
+ setvbuf (stdout, NULL, _IOLBF, 0);
+
argc -= index;
argv += index;
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 12 ++++++++++++
ping/ping.c | 3 +++
ping/ping6.c | 3 +++
3 files changed, 18 insertions(+), 0 deletions(-)
hooks/post-receive
--
GNU Inetutils
_______________________________________________
Commit-inetutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/commit-inetutils