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
- Signal
Handler - 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