(Not knowing anything about the discussion itself but adding some shell info...) Davis Herring [2017-04-17 13:13:39Z] wrote: > src/emacs -Q -l ../reproduce.el > if [ $? -eq 1 ]; then exit 125; else exit $?; done Note that the [ command has its own exit code and $? is reset. If [ ... ] is true (=0) then "exit 125". If [ ... ] is false (=1) then "exit $?" which is always the same as "exit 1". You need to save the exit code before running the [ command: src/emacs -Q -l ../reproduce.el code=$? if [ "$code" -eq 1 ]; then exit 125; else exit "$code"; fi -- /// Teemu Likonen - .-.. // // PGP: 4E10 55DC 84E9 DFF6 13D7 8557 719D 69D3 2453 9450 ///