NOSAVEONHANGUP isn't documented anywhere. I don't see why it should
wipe out recoverable level files just because it doesn't want to build a
save file out of them during the hangup. Leave them intact if checkpoint
is active. If someone really wants to make them always go away, they'll
need to disable INSURANCE as well as enable NOSAVEONHANGUP.
tty's getret() -> xwaitforspace() could get stuck in a loop after
hangup, depending upon the state of terminal shutdown (accepting EOF or
ESC cares about cbreak mode?). Make xwaitforspace() become a no-op during
hangup processing.
vms's call to hangup() from an exit handler took place after the
terminal has been reset (the exit handler for the latter is registered
later so executes sooner). Then exit_nhwindows() resulted in a second tty
reset attempt and settty() -> setctty() encountered an error (which it
reported, triggeting a getret() call). Make the vms code correctly guard
against multiple resets.