- /* Switch to temporary VT */
- snprintf(tpath, sizeof(tpath), "/dev/tty%i", temporary_vt);
- char_array_0(tpath);
- temporary_fd = open_terminal(tpath, O_RDWR|O_NOCTTY|O_CLOEXEC);
- ioctl(fd, VT_ACTIVATE, temporary_vt);
- if (temporary_fd >= 0)
- close_nointr_nofail(temporary_fd);
-
- /* Reopen /dev/tty0 */
- close_nointr_nofail(fd);
- fd = open_terminal("/dev/tty0", O_RDWR|O_NOCTTY|O_CLOEXEC);
+ /* Couldn't deallocate, so let's clear it fully with
+ * scrollback */
+ fd = open_terminal(name, O_RDWR|O_NOCTTY|O_CLOEXEC);