On Sat, 08 Oct 2022 16:01:18 -0000, Klemens Nanni wrote: > Account for this to make permanent redirection failure trigger the ERR > trap: > > $ ./obj/ksh -c 'trap "echo ERR" ERR ; exec >/' > ksh: cannot create /: Is a directory > ERR > > Also add three new regress cases covering this; others keep passing. > > I haven't put this through a bulk build or any other broader testing > besides ksh regress and the actual script I was working on (which now > behaves as expected).
That looks correct to me. I wouldn't expect this to cause portability issues since bash and zsh have the same behavior as your diff. - todd