Where did you get that it’s posix valid? Like link to posix spec? Or hearsay? I know what you mean but haven’t found such. (SIGTERM is catchable though so it does seem a bug/overkill sending SIGKILL instead of SIGSEGV or even SIGTERM.)
Good catch. I haven't found a proper source other than a quotation from some HN comment, so I'm not sure if it actually is POSIX valid or not, just that many people seem to think it is.
Oracle was relying on behaviour that was POSIX valid so I don't see how it is "incorrect code".