-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Eric Blake on 4/17/2008 5:58 AM: | Ahh. Sounds like a difference in whether SIGPIPE is being ignored in the | parent shell at the time the test is run. So should m4 always be verbose | about pipe failures when inheriting an ignored SIGPIPE from the parent?
At this point, I'm thinking about making batch mode always reset SIGPIPE back to default (so that m4 will silently exit with a signal rather than complaining about write failures on stderr, even if SIGPIPE was ignored by the parent process), since m4 in batch mode tends to be used as a filter. ~ But I think interactive mode should always leave SIGPIPE in the state inherited from the parent, which means explicitly warning if output fails due to a pipe write failure when the signal is bypassed. | I | think the following will also work around it for this particular test: | | input | m4 | { sed 1q; cat >/dev/null; } Or more simply with the patch below (no need to use two processes to consume all input when sed can already do that by itself). - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkgHSgkACgkQ84KuGfSFAYDQXwCeNWAgD6knM+hm/m25pdh0cBsO 8i0AmwQCWLaiRvKmugiYYz65Ab25SrJZ =dQc7 -----END PGP SIGNATURE-----
>From 2b570fc0192b1a07ba77bed07d582a3dd788ab7f Mon Sep 17 00:00:00 2001 From: Eric Blake <[EMAIL PROTECTED]> Date: Thu, 17 Apr 2008 06:50:34 -0600 Subject: [PATCH] Fix buildbot failure. * doc/m4.texinfo (Diversions): Consume all of m4's output, in case SIGPIPE is ignored. * THANKS: Update. Detected by Bob Proulx's buildbot. Signed-off-by: Eric Blake <[EMAIL PROTECTED]> --- ChangeLog | 6 ++++++ THANKS | 1 + doc/m4.texinfo | 2 +- 3 files changed, 8 insertions(+), 1 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0e3462e..58abd2d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2008-04-17 Eric Blake <[EMAIL PROTECTED]> + Fix buildbot failure. + * doc/m4.texinfo (Diversions): Consume all of m4's output, in case + SIGPIPE is ignored. + * THANKS: Update. + Detected by Bob Proulx's buildbot. + Avoid gcc shadowing warnings. * src/builtin.c (m4_ifelse): Avoid the name index. (m4_format): s/format/expand_format, so local variables can be diff --git a/THANKS b/THANKS index ab08e6d..8d0aae1 100644 diff --git a/doc/m4.texinfo b/doc/m4.texinfo index 4572e79..cefadfe 100644 --- a/doc/m4.texinfo +++ b/doc/m4.texinfo @@ -4960,7 +4960,7 @@ ifdef(`__unix__', , ')m4exit(`77')')dnl changequote(`[', `]')dnl syscmd([echo 'divert(1)hi -format(%1000000d, 1)' | ]__program__[ | sed 1q])dnl +format(%1000000d, 1)' | ]__program__[ | sed -n 1p])dnl @result{}hi sysval @result{}0 -- 1.5.5