#include <csignal>
#include <cstdlib>
#include <iostream>
#include <new>
#include "child-list.h"
#include "cmd-edit.h"
#include "oct-syscalls.h"
#include "quit.h"
#include "signal-wrappers.h"
#include "defun.h"
#include "error.h"
#include "input.h"
#include "interpreter-private.h"
#include "interpreter.h"
#include "load-save.h"
#include "octave.h"
#include "oct-map.h"
#include "pager.h"
#include "sighandlers.h"
#include "sysdep.h"
#include "utils.h"
#include "variables.h"
Go to the source code of this file.
Variables | |
bool | can_interrupt = false |
int | pipe_handler_error_count = 0 |
static bool * | signals_caught = nullptr |
bool | Vdebug_on_interrupt = false |
static bool | Vsighup_dumps_octave_core = true |
static bool | Vsigquit_dumps_octave_core = true |
static bool | Vsigterm_dumps_octave_core = true |
interrupt_handler catch_interrupts | ( | void | ) |
Definition at line 326 of file sighandlers.cc.
References interrupt_handler::brk_handler, generic_sig_handler(), interrupt_handler::int_handler, and set_signal_handler().
Referenced by interpreter::initialize(), install_signal_handlers(), and interpreter::recover_from_exception().
|
static |
Definition at line 306 of file sighandlers.cc.
References octave_raise_wrapper(), octave_set_default_signal_handler(), and octave_strsignal_wrapper().
Referenced by install_signal_handlers().
OCTAVE_EXPORT octave_value_list Fdebug_on_interrupt | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 531 of file sighandlers.cc.
References set_internal_variable(), and Vdebug_on_interrupt.
|
static |
Definition at line 318 of file sighandlers.cc.
Referenced by install_signal_handlers().
OCTAVE_EXPORT octave_value_list FSIG | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 498 of file sighandlers.cc.
References m, make_sig_struct(), ovl(), and print_usage().
OCTAVE_EXPORT octave_value_list Fsighup_dumps_octave_core | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 561 of file sighandlers.cc.
References set_internal_variable(), and Vsighup_dumps_octave_core.
OCTAVE_EXPORT octave_value_list Fsigquit_dumps_octave_core | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 592 of file sighandlers.cc.
References set_internal_variable(), and Vsigquit_dumps_octave_core.
OCTAVE_EXPORT octave_value_list Fsigterm_dumps_octave_core | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 623 of file sighandlers.cc.
References set_internal_variable(), and Vsigterm_dumps_octave_core.
|
static |
Definition at line 273 of file sighandlers.cc.
References can_interrupt, octave_get_sig_number(), octave_initialized, octave_interrupt_state, octave_signal_caught, and signals_caught.
Referenced by catch_interrupts(), and install_signal_handlers().
interrupt_handler ignore_interrupts | ( | void | ) |
Definition at line 337 of file sighandlers.cc.
References interrupt_handler::brk_handler, interrupt_handler::int_handler, and set_signal_handler().
Referenced by history_system::do_edit_history(), kbhit(), and respond_to_pending_signals().
void install_signal_handlers | ( | void | ) |
Definition at line 365 of file sighandlers.cc.
References catch_interrupts(), deadly_sig_handler(), fpe_sig_handler(), generic_sig_handler(), octave_create_interrupt_watcher_thread(), octave_num_signals(), set_signal_handler(), and signals_caught.
|
static |
Definition at line 448 of file sighandlers.cc.
References m, and set_sig_struct_field().
Referenced by FSIG().
|
static |
Definition at line 88 of file sighandlers.cc.
References __get_load_save_system__(), load_save_system::dump_octave_core(), octave_strsignal_wrapper(), and sysdep_cleanup().
Referenced by respond_to_pending_signals().
void respond_to_pending_signals | ( | void | ) |
Definition at line 110 of file sighandlers.cc.
References __get_child_list__(), ignore_interrupts(), my_friendly_exit(), octave_block_child(), octave_get_sig_number(), octave_interrupt_state, octave_num_signals(), octave_strsignal_wrapper(), octave_unblock_child(), pipe_handler_error_count, child_list::reap(), set_interrupt_handler(), signals_caught, Vsighup_dumps_octave_core, Vsigquit_dumps_octave_core, Vsigterm_dumps_octave_core, and child_list::wait().
Referenced by interpreter::initialize().
interrupt_handler set_interrupt_handler | ( | const volatile interrupt_handler & | h, |
bool | restart_syscalls | ||
) |
Definition at line 348 of file sighandlers.cc.
References interrupt_handler::brk_handler, interrupt_handler::int_handler, and set_signal_handler().
Referenced by history_system::do_edit_history(), kbhit(), and respond_to_pending_signals().
|
static |
Definition at line 437 of file sighandlers.cc.
References m, octave_get_sig_number(), and signum().
Referenced by make_sig_struct().
sig_handler* set_signal_handler | ( | const char * | signame, |
sig_handler * | handler, | ||
bool | restart_syscalls | ||
) |
Definition at line 265 of file sighandlers.cc.
References octave_set_signal_handler_by_name().
sig_handler* set_signal_handler | ( | int | sig, |
sig_handler * | handler, | ||
bool | restart_syscalls | ||
) |
Definition at line 259 of file sighandlers.cc.
References octave_set_signal_handler_internal().
Referenced by catch_interrupts(), ignore_interrupts(), install_signal_handlers(), and set_interrupt_handler().
bool can_interrupt = false |
Definition at line 68 of file sighandlers.cc.
Referenced by generic_sig_handler(), interpreter::initialize(), and interpreter::recover_from_exception().
int pipe_handler_error_count = 0 |
Definition at line 65 of file sighandlers.cc.
Referenced by respond_to_pending_signals().
|
static |
Definition at line 85 of file sighandlers.cc.
Referenced by generic_sig_handler(), install_signal_handlers(), and respond_to_pending_signals().
bool Vdebug_on_interrupt = false |
Definition at line 71 of file sighandlers.cc.
Referenced by bp_table::dbclear_all_signals(), bp_table::dbstop_process_map_args(), Fdebug_on_interrupt(), bp_table::parse_dbfunction_params(), bp_table::process_id_list(), and bp_table::stop_on_err_warn_status().
|
static |
Definition at line 76 of file sighandlers.cc.
Referenced by Fsighup_dumps_octave_core(), and respond_to_pending_signals().
|
static |
Definition at line 79 of file sighandlers.cc.
Referenced by Fsigquit_dumps_octave_core(), and respond_to_pending_signals().
|
static |
Definition at line 82 of file sighandlers.cc.
Referenced by Fsigterm_dumps_octave_core(), and respond_to_pending_signals().