Your explanation has far too many implementation details as
assumptions.   I can assure you that in the NetBSD sh calling
unset on most variables does not create anything in your state 2,
but rather in state 1.    Why would one bother to remember anything
about variables that have been unset?

There are a few exceptions in the implementation for various reasons,
but mostly it is like that - and absolutely always when the variable
was in "state 1" - unset of such a thing is simply a no-op.

kre

ps: "an agreement that the FreeBSD behavior is wrong" should have been
"an agreement that the former FreeBSD behaviour was wrong".   (And no,
the point there is not the UK/US spelling of behaviour, that's irrelevant).


Reply via email to