I discovered the existence of ncurses subroutines reset_prog_mode and reset_shell_mode, but haven't yet figured out if what they do applies to what I'm doing. I don't think I'm having a problem that these would address, so I'm kicking the can down the road.