]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* doc/autoconf.texi (Limitations of Builtins): Document
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 3 Sep 2006 19:41:12 +0000 (19:41 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 3 Sep 2006 19:41:12 +0000 (19:41 +0000)
'unset' bugs of Bash 2.01 and 2.05a.

ChangeLog
doc/autoconf.texi

index f6e702bd31a02c5fa01ed171b5c00b7214a7cc97..0004a0beeb7418ca9f5a805e4255b30d75035ef8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-09-03  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * doc/autoconf.texi (Limitations of Builtins): Document
+       'unset' bugs of Bash 2.01 and 2.05a.
+
 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
 
        * NEWS: New macro AC_CACHE_CHECK_INT.  It replaces the
index 4ffe1edf7890820a25ac59aadf8b8a0f106b97e8..b18dbddba1633e9d37a6854dbb59c5a8d55dc452 100644 (file)
@@ -12850,21 +12850,27 @@ for @command{true}.
 @item @command{unset}
 @c ------------------
 @prindex @command{unset}
-You cannot assume the support of @command{unset}.  Nevertheless, because
+In some nonconforming shells (e.g., Bash 2.05a), @code{unset FOO} fails
+when @code{FOO} is not set.  Also, Bash 2.01 mishandles @code{unset
+MAIL} in some cases and dumps core.
+
+A few ancient shells lack @command{unset} entirely.  Nevertheless, because
 it is extremely useful to disable embarrassing variables such as
 @code{PS1}, you can test for its existence and use
 it @emph{provided} you give a neutralizing value when @command{unset} is
 not supported:
 
-@example
-if (unset FOO) >/dev/null 2>&1; then
+@smallexample
+# "|| exit" suppresses any "Segmentation fault" message.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
   unset=unset
 else
   unset=false
 fi
 $unset PS1 || PS1='$ '
-@end example
+@end smallexample
 
+@noindent
 @xref{Special Shell Variables}, for some neutralizing values.  Also, see
 @ref{Limitations of Builtins}, documentation of @command{export}, for
 the case of environment variables.