- /* Move the cursor to the end of the screen. */
- mvcur(0, COLS - 1, LINES - 1, 0);
-
- /* End the window. */
+ /*
+ * Block every signal we can get our hands on. This is because
+ * applications have timers going off that want to repaint the
+ * screen.
+ */
+ (void)sigfillset(&set);
+ (void)sigprocmask(SIG_BLOCK, &set, &oset);
+
+ /*
+ * End the window, which also resets the terminal state to the
+ * original modes.
+ */