bug-autoconf
[Top][All Lists]
Advanced

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

AS_EXIT and default value


From: Ralf Wildenhues
Subject: AS_EXIT and default value
Date: Fri, 24 Jul 2009 22:39:49 +0200
User-agent: Mutt/1.5.20 (2009-06-15)

As documented in autoconf.texi 'Shell Functions',

     Likewise, the state of `$?' is not reliable when entering a shell
  function.  This has the effect that using a function as the first
  command in a `trap' handler can cause problems.

This hit me with FreeBSD 6.4 /bin/sh, and it trips the AS_EXIT test due
to commit bbc3dc81c which assumes that
$ false || AS_EXIT

works; but this shell seems to reset the status upon function entry:
$ sh -c 'f () { echo $?; }; false; f'
0

which means an AS_EXIT implementation using a function is a problem
here.

Do you see any other way out except to undo the move to use a shell
function for AS_EXIT (740062eb42)?

Thanks,
Ralf




reply via email to

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