On Fri, May 20, 2016 at 07:37:29PM +0100, Gavin Smith wrote: > I believe the following is the correct fix: > > Index: texi2dvi > =================================================================== > --- texi2dvi (revision 7149) > +++ texi2dvi (working copy) > @@ -1494,7 +1494,11 @@ > # ./ in case . isn't in path > verbose "$0: running $tex_cmd ..." > rm -fr "openout.$2" > - eval "$tex_cmd" >/dev/null 2>&1 > + if eval "$tex_cmd" >/dev/null 2>&1; then > + return 0 # success > + else > + return 1 # failure > + fi > } > > # Check tex supports -recorder option > > > For some reason with many shells other than the one you're using, the > "set -e" doesn't apply here because it's run within an "if" condition, > but I don't think we should rely on that.
Unfortunately this does not work out either (see e.g. the discussion at https://lists.gnu.org/archive/html/autoconf-patches/2006-10/msg00092.html). The proposed fix there is to put the statement into a subshell (via (...)). So (eval "$tex_cmd" >/dev/null 2>&1) instead of eval "$tex_cmd" >/dev/null 2>&1 works for me (and does not even need the if/return combo as proposed). Best regards, Ingo
