26 #if defined (HAVE_CONFIG_H)
36 #if defined (OCTAVE_USE_WINDOWS_API)
37 # define WIN32_LEAN_AND_MEAN
90 std::cerr <<
"fatal: caught signal "
92 <<
" -- stopping myself..." << std::endl;
99 throw exit_exception (1);
114 static const bool have_sigint
118 static const bool have_sigbreak
124 static const bool have_sighup
128 static const bool have_sigquit
132 static const bool have_sigterm
138 static const bool have_sigalrm
141 static int sigvtalrm;
142 static const bool have_sigvtalrm
148 static const bool have_sigio
152 static const bool have_siglost
156 static const bool have_sigpipe
162 static const bool have_sigchld
166 static const bool have_sigcld
172 static const bool have_sigxcpu
176 static const bool have_sigxfsz
182 static const bool have_sigusr1
186 static const bool have_sigusr2
197 if ((have_sigchld && sig == sigchld)
198 || (have_sigcld && sig == sigcld))
214 else if (have_sigpipe && sig == sigpipe)
216 std::cerr <<
"warning: broken pipe" << std::endl;
226 else if (have_sighup && sig == sighup)
228 else if (have_sigquit && sig == sigquit)
230 else if (have_sigterm && sig == sigterm)
232 else if ((have_sigalrm && sig == sigalrm)
233 || (have_sigvtalrm && sig == sigvtalrm)
234 || (have_sigio && sig == sigio)
235 || (have_siglost && sig == siglost)
236 || (have_sigxcpu && sig == sigxcpu)
237 || (have_sigxfsz && sig == sigxfsz)
238 || (have_sigusr1 && sig == sigusr1)
239 || (have_sigusr2 && sig == sigusr2))
240 std::cerr <<
"warning: ignoring signal: "
243 else if ((have_sigint && sig == sigint)
244 || (have_sigbreak && sig == sigbreak))
247 std::cerr <<
"warning: ignoring unexpected signal: "
262 bool restart_syscalls)
280 static const bool have_sigint
284 static const bool have_sigbreak
287 if ((have_sigint && sig == sigint)
288 || (have_sigbreak && sig == sigbreak))
304 std::cerr <<
"fatal: caught signal "
306 <<
" -- stopping myself..." << std::endl;
318 std::cerr <<
"warning: floating point exception" << std::endl;
345 bool restart_syscalls)
440 m.assign (&signame[3],
signum);
497 if (args.length () != 0)
512 DEFUN (debug_on_interrupt, args, nargout,
531 "debug_on_interrupt");
546 DEFUN (sighup_dumps_octave_core, args, nargout,
562 "sighup_dumps_octave_core");
577 DEFUN (sigquit_dumps_octave_core, args, nargout,
593 "sigquit_dumps_octave_core");
608 DEFUN (sigterm_dumps_octave_core, args, nargout,
624 "sigterm_dumps_octave_core");
OCTINTERP_API void print_usage(void)
#define DEFUN(name, args_name, nargout_name, doc)
Macro to define a builtin function.
void dump_octave_core(void)
static bool Vsigquit_dumps_octave_core
static bool Vsigterm_dumps_octave_core
sig_handler * set_signal_handler(int sig, sig_handler *handler, bool restart_syscalls)
interrupt_handler set_interrupt_handler(const volatile interrupt_handler &h, bool restart_syscalls)
static bool Vsighup_dumps_octave_core
void respond_to_pending_signals(void)
static void generic_sig_handler(int sig)
int pipe_handler_error_count
static llvm::LLVMContext & context
interrupt_handler ignore_interrupts(void)
static bool * signals_caught
static octave_scalar_map make_sig_struct(void)
void sysdep_cleanup(void)
static void fpe_sig_handler(int)
static void deadly_sig_handler(int sig)
static void set_sig_struct_field(octave_scalar_map &m, const char *signame)
interrupt_handler catch_interrupts(void)
child_list & __get_child_list__(const std::string &who)
void install_signal_handlers(void)
static void my_friendly_exit(int sig, bool save_vars=true)
octave_value::octave_value(const Array< char > &chm, char type) return retval
octave_value_list ovl(const OV_Args &... args)
Construct an octave_value_list with less typing.
volatile sig_atomic_t octave_signal_caught
sig_atomic_t octave_interrupt_state
void octave_create_interrupt_watcher_thread(octave_sig_handler *handler)
octave_sig_handler * octave_set_default_signal_handler(int sig)
int octave_num_signals(void)
void * octave_block_child(void)
char * octave_strsignal_wrapper(int signum)
void octave_unblock_child(void *context_arg)
bool octave_get_sig_number(const char *signame, int *signum)
int octave_raise_wrapper(int signum)
octave_sig_handler * octave_set_signal_handler_by_name(const char *signame, octave_sig_handler *handler, bool restart_syscalls)
octave_sig_handler * octave_set_signal_handler_internal(int sig, octave_sig_handler *handler, bool restart_syscalls)
sig_handler * int_handler
sig_handler * brk_handler
octave_value set_internal_variable(bool &var, const octave_value_list &args, int nargout, const char *nm)