[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: segmentation fault on 'unset MAIL' for bash 2.01.1(1)-release

From: Paul Eggert
Subject: Re: segmentation fault on 'unset MAIL' for bash 2.01.1(1)-release
Date: 31 Jul 2003 12:24:09 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Brian Gough <address@hidden> writes:

> The one potential issue with this approach is that it will potentially
> leave behind a stray core file with the versions of bash which have
> the bug.

Doesn't 'configure' clean up those core files at the end?

> Below is a patch which tests each unset VAR command inside `...` (this
> doesn't propagate signals, in bash anyway, so the error message is
> hidden).  If the variable is already null or unset it leaves it alone.

Thanks, but that looks a bit tricky; I worry that it might cause
problems with other (old, broken) shells.  How about the following
patch instead?  It should avoid the "Segmentation fault" message that
bothered you.

--- m4sh.m4.~1.98.~     Thu May 22 14:39:45 2003
+++ m4sh.m4     Thu Jul 31 12:20:25 2003
@@ -276,9 +276,11 @@ fi
 # -----------------
 # AS_UNSET depends upon $as_unset: compute it.
+# Use MAIL to trigger a bug in Bash 2.01;
+# the "|| exit" suppresses the resulting "Segmentation fault" message.
 [# Support unset when possible.
-if (as_foo=foo; unset as_foo) >/dev/null 2>&1; then
+if ((MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then

reply via email to

[Prev in Thread] Current Thread [Next in Thread]