The OpenBSD sh(1) and ksh(1) shells' eval built in does not respect the
fact that it's being executed in an AND-OR list or in a conditional
statement when a shell is running with "set -e" activated.

In these situations, if the return status of eval is non-zero, the shell
should not be terminated.

Example:

    set -e
    eval false || echo ok

Expected behaviour: "ok" should be outputted, and the shell should
continue executing any further instructions.

Observed behaviour: The shell is terminated with the execution of eval.

Example:

    set -e
    if ! eval false; then
        echo ok
    fi

As above, the shell should output "ok", not terminate with the execution
of eval.

I don't currently have a fix for this, sorry.

This is on OpenBSD/amd64 6.5-current

Regards,

-- 
Kusalananda
Sweden

Reply via email to