Module runtime

Module runtime 

Source
Expand description

Runtime utilities for terminal state management

This module provides:

  • Panic hook for terminal restoration
  • Signal handling (SIGINT, SIGTERM, SIGHUP)
  • Environment detection (CI, TTY)

Structs§

Environment
Environment information
SignalHandler
Signal handler that manages graceful shutdown

Functions§

install_panic_hook
Install a panic hook that restores terminal state before printing panic info
install_signal_handler
Install a global signal handler that restores terminal state on signals
is_ci
Check if running in a CI environment
is_tty
Check if stdout is a TTY (terminal)
restore_terminal
Restore terminal to a normal state