The subshell is still aware of its context (being that it's a fork with
essentially a copy of the parent environment), it just is isolated from the
parent process and can't affect its control flow, so a jump to the end of the
subshell seems reasonable. Another example would be within a function, calling
"return" within a subshell will have a similar effect. The subshell still has
to know to allow a call to return in the current context. I don't see any
mention of these things in POSIX but the behavior makes sense.
mksh just refuses to break and prints an error. If it's unspecified then
that's also valid I suppose.
You might also notice some funny things with pipes. Try this with Bash shopt
lastpipe, with/without set -m, and in ksh93.
for x in 1 2; do printf "$x" >&2 | { break; printf X; }; printf Y; done
--
Dan Douglas