pub fn revert_terminal_on_panic()
Sets a panic handler to restore the terminal state when the process panics.