[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: |
Brian Gough |
Subject: |
Re: segmentation fault on 'unset MAIL' for bash 2.01.1(1)-release |
Date: |
Thu, 31 Jul 2003 22:45:47 +0100 |
Paul Eggert writes:
> 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.
Thanks, your new patch works well.
I've tested it for versions of bash with and without the bug (2.01 and
2.05a) and it handles both cases cleanly.
best regards,
--
Brian Gough
p.s. Just to confirm, you were right on the extra core file being
removed at the end by the configure script so there was no problem
there.
Network Theory Ltd
15 Royal Park
Bristol BS8 3AL
United Kingdom
Tel: +44 (0)117 3179309
Fax: +44 (0)117 9048108
Web: http://www.network-theory.co.uk/
>
>
> --- 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_PREPARE
> # -----------------
> # 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.
> m4_defun([_AS_UNSET_PREPARE],
> [# 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
> as_unset=unset
> else
> as_unset=false