On 20 May 2016 at 20:38, Ingo Feinerer <[email protected]> wrote:
> 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).
OK, so with this shell any "eval" statement can cause an exit under
"set -e", regardless of the context of the statement?
Is this code wrong (in "run_tex")?
verbose "$0: Running $tex_cmd ..."
if eval "$tex_cmd" >&5; then
case $out_lang in
dvi | pdf ) move_to_dest "$in_noext.$out_lang";;
esac
else
error 1 "$tex exited with bad status, quitting."
fi
If "$tex_cmd" fails, then an exit will be triggered, and the error
message "exited with bad status" won't be given.
Should parentheses around the "eval" be used here?