Unfortunately it looks like sh -x does not trace into functions, and it is something inside "main" which is crashing:
> > set -x or something. > Sorry, I should have started with that. > > test73# doas -u _pfbadhost pf-badhost -O openbsd > [ ... ] > + command -v typeset > + > /dev/null > + 2>&1 > + main -O openbsd > Illegal instruction > [ ... ] > Illegal instruction (core dumped) > > No blocklist changes... > Illegal instruction (core dumped) Both sh and ksh seem to behave that way, but bash will trace inside functions. Try calling the script with 'bash -x' and hopefully you can pinpoint which binary called by main() is crashing. -Andrew