pub static LINUX_TERMINAL_STATE: Atomic<LinuxTermios>
Available on crate features
unsafe_syscall
and linux
and dep_atomic
and dep_bytemuck
only.Expand description
State of the terminal saved globally, that can be restored from anywhere.
This allows to restore the initial terminal state from a panic handler. E.g.:
ⓘ
#[panic_handler]
fn panic(_info: &core::panic::PanicInfo) -> ! {
LinuxTerminal::restore_saved_state().unwrap();
}
§Features
Makes use of atomic
and bytemuck
dependencies to save the
terminal state in an Atomic
.