#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 |
OCTAVE_NAMESPACE_BEGIN 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 327 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 307 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 532 of file sighandlers.cc.
References set_internal_variable(), and Vdebug_on_interrupt.
|
static |
Definition at line 319 of file sighandlers.cc.
Referenced by install_signal_handlers().
OCTAVE_EXPORT octave_value_list FSIG | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 499 of file sighandlers.cc.
References 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 562 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 593 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 624 of file sighandlers.cc.
References set_internal_variable(), and Vsigterm_dumps_octave_core.
|
static |
Definition at line 274 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 338 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 366 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 449 of file sighandlers.cc.
References set_sig_struct_field().
Referenced by FSIG().
Definition at line 88 of file sighandlers.cc.
References octave::__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 111 of file sighandlers.cc.
References octave::__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, set_interrupt_handler(), signals_caught, Vsighup_dumps_octave_core, Vsigquit_dumps_octave_core, and Vsigterm_dumps_octave_core.
Referenced by interpreter::initialize().
interrupt_handler set_interrupt_handler | ( | const volatile interrupt_handler & | h, |
bool | restart_syscalls | ||
) |
Definition at line 349 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 438 of file sighandlers.cc.
References octave_scalar_map::assign(), octave_get_sig_number(), and octave::math::signum().
Referenced by make_sig_struct().
sig_handler * set_signal_handler | ( | const char * | signame, |
sig_handler * | handler, | ||
bool | restart_syscalls | ||
) |
Definition at line 266 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 260 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().
OCTAVE_NAMESPACE_BEGIN 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 |
|
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().