llows an application to defer all of the handling of the signals Readline catches to Readline. Applications should use this variable with care; it can result in Readline catching signals and not acting on them (or allowing the application to react to them) until the application calls 'rl_callback_read_char'. This can result in an application becoming less responsive to keyboard signals like SIGINT. If an application does not want or need to perform any signal handling, or does not need to do any processing between calls to 'rl_callback_read_char', setting this variable may be desirable. Readline provides two variables that allow application writers to control whether or not it will catch certain signals and act on them when they are received. It is important that applications change the values of these variables only when calling 'readline()', not in a signal handler, so Readline's internal signal state is not corrupted. -- Variable: int rl_catch_signals If this variable is non-zero, Readline will install signal handlers for 'SIGINT', 'SIGQUIT', 'SIGTERM', 'SIGHUP', 'SIGALRM', 'SIGTSTP', 'SIGTTIN', and 'SIGTTOU'. The default value of 'rl_catch_signals' is 1. -- Variable: int rl_catch_sigwinch If this variable is set to a non-zero value, Readline will install a signal handler for 'SIGWINCH'. The default value of 'rl_catch_sigwinch' is 1. -- Variable: int rl_persistent_signal_handlers If an application using the callback interface wishes Readline's signal handlers to be installed and active during the set of calls to 'rl_callback_read_char' that constitutes an entire single line, it should set this variable to a non-zero value. The default value of 'rl_persistent_signal_handlers' is 0. -- Variable: int rl_change_environment If this variable is set to a non-zero value, and Readline is handling 'SIGWINCH', Readline will modify the LINES and COLUMNS environment variables upon receipt of a 'SIGWINCH' The default value of 'rl_change_environment' is 1. If an application does not wish to have Readline catch any signals, or to handle signals other than those Readline catches ('SIGHUP', for example), Readline provides convenience functions to do the necessary terminal and internal state cleanup upon receipt of a signal. -- Function: int rl_pending_signal (void) Return the signal number of the most recent signal Readline received but has not yet handled, or 0 if there is no pending signal. -- Function: void rl_cleanup_after_signal (void) This function will reset the state of the terminal to what it was before 'readline()' was called, and remove the Readline signal handlers for all signals, depending on the values of 'rl_catch_signals' and 'rl_catch_sigwinch'. -- Function: void rl_free_line_state (void) This will free any partial state associated with the current input line (undo information, any partial history entry, any partially-entered keyboard macro, and any partially-entered numeric argument). This should be called before 'rl_cleanup_after_signal()'. The Readline signal handler for 'SIGINT' calls this to abort the current input line. -- Function: void rl_reset_after_signal (void) This will reinitialize the terminal and reinstall any Readline signal handlers, depending on the values of 'rl_catch_signals' and 'rl_catch_sigwinch'. If an application wants to force Readline to handle any signals that have arrived while it has been executing, 'rl_check_signals()' will call Readline's internal signal handler if there are any pending signals. This is primarily intended for those applications that use a custom 'rl_getc_function' (*note Readline Variables::) and wish to handle signals received while waiting for input. -- Function: void rl_check_signals (void) If there are any pending signals, call Readline's internal signal handling functions to process them. 'rl_pending_signal()' can be used independently to determine whether or not there are any pending signals. If an application does not wish Readline to catch 'SIGWINCH', it may call 'rl_resize_terminal()' or 'rl_set_screen_size()' to force Readline to update its idea of the terminal size when it receives a 'SIGWINCH'. -- Function: void rl_echo_signal_char (int sig) If an application wishes to install its own signal handlers, but still have Readline display characters that generate signals, calling this function with SIG set to 'SIGINT', 'SIGQUIT', or 'SIGTSTP' will display the character generating that signal. -- Function: void rl_resize_terminal (void) Update Readline's internal screen size by reading values from the kernel. -- Function: void rl_set_screen_size (int rows, int cols) Set Readline's idea of the terminal size to ROWS rows and COLS columns. If either ROWS or COLUMNS is less than or equal to 0, Readline's idea of that terminal dimension is unchanged. This is intended to tell Readline the physical dimensions of the terminal, and is used internally to calculate the maximum number of characters that may appear on a single line and on the screen. If an application does not want to install a 'SIGWINCH' handler, but is still interested in the screen dimensions, it may query Readline's idea of the screen size. -- Function: void rl_get_screen_size (int *rows, int *cols) Return Readline's idea of the terminal's size in the variables pointed to by the arguments. -- Function: void rl_reset_screen_size (void) Cause Readline to reobtain the screen size and recalculate its dimensions. The following functions install and remove Readline's signal handlers. -- Function: int rl_set_signals (void) Install Readline's signal handler for 'SIGINT', 'SIGQUIT', 'SIGTERM', 'SIGHUP', 'SIGALRM', 'SIGTSTP', 'SIGTTIN', 'SIGTTOU', and 'SIGWINCH', depending on the values of 'rl_catch_signals' and 'rl_catch_sigwinch'. -- Function: int rl_clear_signals (void) Remove all of the Readline signal handlers installed by 'rl_set_signals()'.