[][src]Module lc3_vm::sys::terminal

Functions

restore_terminal_settings
spawn_control_c_handler

When the program is interrupted (with pressing Control-C keys), we want to restore the terminal settings back to normal. spawn_control_c_handler function will spawn a thread to handle Control-C (interrupt signal). When user presses Control-C keys, it restores terminal to its original, i.e. it turns value of ICANON and ECHO modes to 1. And exists the process with process code = 130 (as mentioned here, http://tldp.org/LDP/abs/html/exitcodes.html).

turn_off_canonical_and_echo_modes