GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
signal-wrappers.c File Reference
#include <sys/types.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <pthread.h>
#include "signal-wrappers.h"
Include dependency graph for signal-wrappers.c:

Go to the source code of this file.

Classes

struct  sigset_info
 

Functions

static void block_or_unblock_signal (int how, int sig)
 
static void block_or_unblock_signal_by_name (int how, const char *signame)
 
void * octave_alloc_signal_mask (void)
 
static const sigset_t * octave_async_signals (void)
 
void octave_block_async_signals (void)
 
void * octave_block_child (void)
 
void octave_block_interrupt_signal (void)
 
void octave_block_signal_by_name (const char *signame)
 
void octave_create_interrupt_watcher_thread (octave_sig_handler *handler)
 
void octave_free_signal_mask (void *mask)
 
bool octave_get_sig_number (const char *signame, int *signum)
 
void octave_get_signal_mask (void *mask)
 
bool octave_have_kill (void)
 
int octave_kill_wrapper (pid_t pid, int signum)
 
int octave_num_signals (void)
 
int octave_raise_wrapper (int signum)
 
void octave_restore_signal_mask (void)
 
void octave_save_signal_mask (void)
 
octave_sig_handleroctave_set_default_signal_handler (int sig)
 
octave_sig_handleroctave_set_default_signal_handler_by_name (const char *signame)
 
octave_sig_handleroctave_set_signal_handler_by_name (const char *signame, octave_sig_handler *handler, bool restart_syscalls)
 
octave_sig_handleroctave_set_signal_handler_internal (int sig, octave_sig_handler *handler, bool restart_syscalls)
 
void octave_set_signal_mask (void *mask)
 
void octave_show_sigmask (const char *msg)
 
char * octave_strsignal_wrapper (int signum)
 
void octave_unblock_async_signals (void)
 
void octave_unblock_child (void *context_arg)
 
void octave_unblock_interrupt_signal (void)
 
void octave_unblock_signal_by_name (const char *signame)
 
static int print_sigmask (FILE *of, const char *msg)
 
static void print_sigset (FILE *of, const char *prefix, const sigset_t *sigset)
 
static void * signal_watcher (void *arg)
 

Variables

static sigset_t octave_signal_mask
 

Function Documentation

◆ block_or_unblock_signal()

static void block_or_unblock_signal ( int  how,
int  sig 
)
static

◆ block_or_unblock_signal_by_name()

static void block_or_unblock_signal_by_name ( int  how,
const char *  signame 
)
static

◆ octave_alloc_signal_mask()

void* octave_alloc_signal_mask ( void  )

Definition at line 553 of file signal-wrappers.c.

References malloc().

Referenced by get_signal_mask().

◆ octave_async_signals()

static const sigset_t* octave_async_signals ( void  )
static

◆ octave_block_async_signals()

void octave_block_async_signals ( void  )

Definition at line 662 of file signal-wrappers.c.

References octave_async_signals().

Referenced by main().

◆ octave_block_child()

void* octave_block_child ( void  )

Definition at line 420 of file signal-wrappers.c.

References octave::context, and malloc().

Referenced by octave::respond_to_pending_signals().

◆ octave_block_interrupt_signal()

void octave_block_interrupt_signal ( void  )

Definition at line 490 of file signal-wrappers.c.

References block_or_unblock_signal().

Referenced by octave::qt_application::execute().

◆ octave_block_signal_by_name()

void octave_block_signal_by_name ( const char *  signame)

Definition at line 519 of file signal-wrappers.c.

References block_or_unblock_signal_by_name().

Referenced by main().

◆ octave_create_interrupt_watcher_thread()

void octave_create_interrupt_watcher_thread ( octave_sig_handler handler)

Definition at line 710 of file signal-wrappers.c.

References octave_unblock_async_signals(), and signal_watcher().

Referenced by octave::install_signal_handlers().

◆ octave_free_signal_mask()

void octave_free_signal_mask ( void *  mask)

Definition at line 559 of file signal-wrappers.c.

References free().

Referenced by restore_signal_mask().

◆ octave_get_sig_number()

◆ octave_get_signal_mask()

void octave_get_signal_mask ( void *  mask)

Definition at line 565 of file signal-wrappers.c.

Referenced by get_signal_mask().

◆ octave_have_kill()

bool octave_have_kill ( void  )

Definition at line 70 of file signal-wrappers.c.

Referenced by octave::sys::kill().

◆ octave_kill_wrapper()

int octave_kill_wrapper ( pid_t  pid,
int  signum 
)

◆ octave_num_signals()

int octave_num_signals ( void  )

◆ octave_raise_wrapper()

int octave_raise_wrapper ( int  signum)

Definition at line 678 of file signal-wrappers.c.

References octave::math::signum().

Referenced by octave::deadly_sig_handler().

◆ octave_restore_signal_mask()

void octave_restore_signal_mask ( void  )

Definition at line 547 of file signal-wrappers.c.

References octave_signal_mask.

Referenced by octave::interpreter::recover_from_exception().

◆ octave_save_signal_mask()

void octave_save_signal_mask ( void  )

Definition at line 541 of file signal-wrappers.c.

References octave_signal_mask.

Referenced by octave::interpreter::initialize().

◆ octave_set_default_signal_handler()

octave_sig_handler* octave_set_default_signal_handler ( int  sig)

Definition at line 396 of file signal-wrappers.c.

References octave_set_signal_handler_internal().

Referenced by octave::deadly_sig_handler().

◆ octave_set_default_signal_handler_by_name()

octave_sig_handler* octave_set_default_signal_handler_by_name ( const char *  signame)

Definition at line 402 of file signal-wrappers.c.

References octave_set_signal_handler_by_name().

◆ octave_set_signal_handler_by_name()

octave_sig_handler* octave_set_signal_handler_by_name ( const char *  signame,
octave_sig_handler handler,
bool  restart_syscalls 
)

◆ octave_set_signal_handler_internal()

octave_sig_handler* octave_set_signal_handler_internal ( int  sig,
octave_sig_handler handler,
bool  restart_syscalls 
)

◆ octave_set_signal_mask()

void octave_set_signal_mask ( void *  mask)

Definition at line 571 of file signal-wrappers.c.

Referenced by restore_signal_mask().

◆ octave_show_sigmask()

void octave_show_sigmask ( const char *  msg)

Definition at line 767 of file signal-wrappers.c.

References print_sigmask().

◆ octave_strsignal_wrapper()

char* octave_strsignal_wrapper ( int  signum)

◆ octave_unblock_async_signals()

void octave_unblock_async_signals ( void  )

◆ octave_unblock_child()

void octave_unblock_child ( void *  context_arg)

Definition at line 449 of file signal-wrappers.c.

References octave::context, and free().

Referenced by octave::respond_to_pending_signals().

◆ octave_unblock_interrupt_signal()

void octave_unblock_interrupt_signal ( void  )

Definition at line 500 of file signal-wrappers.c.

References block_or_unblock_signal().

◆ octave_unblock_signal_by_name()

void octave_unblock_signal_by_name ( const char *  signame)

Definition at line 525 of file signal-wrappers.c.

References block_or_unblock_signal_by_name().

Referenced by octave::interpreter::interpreter(), Fsystem(), and main().

◆ print_sigmask()

static int print_sigmask ( FILE *  of,
const char *  msg 
)
static

Definition at line 750 of file signal-wrappers.c.

References print_sigset().

Referenced by octave_show_sigmask().

◆ print_sigset()

static void print_sigset ( FILE *  of,
const char *  prefix,
const sigset_t *  sigset 
)
static

Definition at line 729 of file signal-wrappers.c.

Referenced by print_sigmask().

◆ signal_watcher()

static void* signal_watcher ( void *  arg)
static

Variable Documentation

◆ octave_signal_mask

sigset_t octave_signal_mask
static

Definition at line 538 of file signal-wrappers.c.

Referenced by octave_restore_signal_mask(), and octave_save_signal_mask().