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 M4 source repository".

http://git.sv.gnu.org/gitweb/?p=m4.git;a=commitdiff;h=97a7769765cde8e9bbff022001e475b07f7bbaf2

The branch, master has been updated
       via  97a7769765cde8e9bbff022001e475b07f7bbaf2 (commit)
      from  693e6ecc7448f782c2db9fc148c6876178d8b199 (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 -----------------------------------------------------------------
commit 97a7769765cde8e9bbff022001e475b07f7bbaf2
Author: Eric Blake <[EMAIL PROTECTED]>
Date:   Thu Apr 17 09:06:12 2008 -0600

    Fix testsuite bug when SIGPIPE is ignored.
    
    * tests/builtins.at (divert): Consume all of m4's output, to avoid
    spurious write failure.
    * src/main.c (main): In batch mode, restore default handling of
    SIGPIPE.
    * doc/m4.texinfo (Operation modes): Document SIGPIPE behavior.
    * THANKS: Update.
    Reported by Bob Proulx, via his autobuilder.
    
    Signed-off-by: Eric Blake <[EMAIL PROTECTED]>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog         |   11 +++++++++++
 THANKS            |    1 +
 doc/m4.texinfo    |    6 ++++--
 src/main.c        |    2 ++
 tests/builtins.at |    2 +-
 5 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b4bdf14..1335a87 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2008-04-17  Eric Blake  <[EMAIL PROTECTED]>
+
+       Fix testsuite bug when SIGPIPE is ignored.
+       * tests/builtins.at (divert): Consume all of m4's output, to avoid
+       spurious write failure.
+       * src/main.c (main): In batch mode, restore default handling of
+       SIGPIPE.
+       * doc/m4.texinfo (Operation modes): Document SIGPIPE behavior.
+       * THANKS: Update.
+       Reported by Bob Proulx, via his autobuilder.
+
 2008-04-15  Eric Blake  <[EMAIL PROTECTED]>
 
        Fix 'make installcheck' after './configure --prefix-progname'.
diff --git a/THANKS b/THANKS
index 6d476d3..0c655be 100644
--- a/THANKS
+++ b/THANKS
@@ -25,6 +25,7 @@ Bernhard Daeubler     [EMAIL PROTECTED]
 Bill Bumgarner         [EMAIL PROTECTED]
 Bjorn R. Bjornsson     [EMAIL PROTECTED]
 Bob Badour             [EMAIL PROTECTED]
+Bob Proulx             [EMAIL PROTECTED]
 Brendan Kehoe          [EMAIL PROTECTED]
 Brian J. Fox           [EMAIL PROTECTED]
 Brian D. Carlstrom     [EMAIL PROTECTED]
diff --git a/doc/m4.texinfo b/doc/m4.texinfo
index d0bbfa4..280d633 100644
--- a/doc/m4.texinfo
+++ b/doc/m4.texinfo
@@ -618,7 +618,8 @@ performing any other actions.
 @item -b
 @itemx --batch
 Makes this invocation of @code{m4} non-interactive.  This means that
-output will be buffered, and interrupts will halt execution.  If neither
+output will be buffered, and an interrupt or pipe write error will halt
+execution.  If neither
 @option{-b} nor @option{-i} are specified, this is activated by default
 when any input files are specified, or when either standard input or
 standard error is not a terminal.  Note that this means that @kbd{m4}
@@ -647,7 +648,8 @@ a warning is issued.  The introduction of behavior levels 
is new to M4
 @itemx --interactive
 @itemx -e
 Makes this invocation of @code{m4} interactive.  This means that all
-output will be unbuffered, and interrupts will be ignored.  If neither
+output will be unbuffered, interrupts will be ignored, and behavior on
+pipe write errors is inherited from the parent process.  If neither
 @option{-b} nor @option{-i} are specified, this is activated by default
 when no input files are specified, and when both standard input and
 standard error are terminals (similar to the way that /bin/sh determines
diff --git a/src/main.c b/src/main.c
index 86f21e7..7c3b9cc 100644
--- a/src/main.c
+++ b/src/main.c
@@ -616,6 +616,8 @@ main (int argc, char *const *argv, char *const *envp)
       signal (SIGINT, SIG_IGN);
       setbuf (stdout, NULL);
     }
+  else
+    signal (SIGPIPE, SIG_DFL);
 
 
   /* Do the basic initializations.  */
diff --git a/tests/builtins.at b/tests/builtins.at
index 2030b14..c63246b 100644
--- a/tests/builtins.at
+++ b/tests/builtins.at
@@ -296,7 +296,7 @@ hello world
 
 dnl Test large diversions, which were broken in m4 1.4.8-1.4.10.
 AT_CHECK([echo 'divert(1)hi
-format(%1000000d, 1)' | $M4 | sed 1q], [0], [[hi
+format(%1000000d, 1)' | $M4 | sed -n 1p], [0], [[hi
 ]])
 
 AT_DATA([in.m4], [M4_ONE_MEG_DEFN[divert(`2')f`'dnl


hooks/post-receive
--
GNU M4 source repository


Reply via email to