index b4bdf140db46aa446be68fe9aa607b658e76f9c1..1335a8772e10374afdf4db37744487f5eb2514bf 100644 (file)
+2008年04月17日 Eric Blake <ebb9@byu.net>
+
+ 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 <ebb9@byu.net>
Fix 'make installcheck' after './configure --prefix-progname'.
index 6d476d32c9a2a425228433c66019e31f988f641d..0c655be4762c7ca9feff51a297576e02568756fa 100644 (file)
@@ -25,6 +25,7 @@ Bernhard Daeubler daeb@physik.uni-ulm.de
Bill Bumgarner bbum@thoughtport.com
Bjorn R. Bjornsson brb@falcon.is
Bob Badour bob@badour.net
+Bob Proulx bob@proulx.com
Brendan Kehoe brendan@cygnus.com
Brian J. Fox bfox@datawave.net
Brian D. Carlstrom bdc@clark.lcs.mit.edu
index d0bbfa478730f50990c2aa44de3eb4357ab566c3..280d633a54fa3ed13027b7ecbb7b46d36e19261c 100644 (file)
@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
index 86f21e769a76aadb61f5ce90c69546b0dac23a65..7c3b9ccdca9787bbb9578a3389ec5dc088ab0522 100644 (file)
@@ -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. */
index 2030b14ef5de456b75146935d53bccbb292dd09d..c63246bbb73f02c1cae4a44e928b7b5e77658b16 100644 (file)
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