+2006-01-25 Paul Eggert <eggert@cs.ucla.edu>
+
+ * doc/autoconf.texi (Limitations of Builtins): Document the
+ problem with "trap -".
+
2006-01-23 Steven G. Johnson <stevenj@fftw.org>
* lib/autoconf/fortran.m4 (_AC_FC_LIBRARY_LDFLAGS, _AC_FC_DUMMY_MAIN):
trap 0, i.e., have the @command{trap} run when the script ends (either via an
explicit @command{exit}, or the end of the script).
+Posix says that @samp{trap - 1 2 13 15} resets the traps for the
+specified signals to their default values, but many common shells (e.g.,
+Solaris @command{/bin/sh}) misinterpret this and attempt to execute a
+``command'' named @command{-} when the specified conditions arise.
+There is no portable workaround, except for @samp{trap - 0}, for which
+@samp{trap '' 0} is a portable substitute.
+
Although Posix is not absolutely clear on this point, it is widely
admitted that when entering the trap @samp{$?} should be set to the exit
status of the last command run before the trap. The ambiguity can be