OpenVPN
Data Structures | Macros | Functions | Variables
sig.h File Reference
#include "status.h"
#include "win32.h"
Include dependency graph for sig.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  signal_info
 

Macros

#define SIG_SOURCE_SOFT   0
 
#define SIG_SOURCE_HARD   1
 
#define SIG_SOURCE_CONNECTION_FAILED   2
 
#define IS_SIG(c)   ((c)->sig->signal_received)
 

Functions

int parse_signal (const char *signame)
 
const char * signal_name (const int sig, const bool upper)
 
const char * signal_description (const int signum, const char *sigtext)
 
void throw_signal (const int signum)
 
void throw_signal_soft (const int signum, const char *signal_text)
 
void pre_init_signal_catch (void)
 
void post_init_signal_catch (void)
 
void restore_signal_state (void)
 
void print_signal (const struct signal_info *si, const char *title, int msglevel)
 
void print_status (const struct context *c, struct status_output *so)
 
void remap_signal (struct context *c)
 
void signal_restart_status (const struct signal_info *si)
 
bool process_signal (struct context *c)
 
void register_signal (struct context *c, int sig, const char *text)
 
void process_explicit_exit_notification_timer_wakeup (struct context *c)
 
static void get_signal (volatile int *sig)
 
static void halt_non_edge_triggered_signals (void)
 

Variables

struct signal_info siginfo_static
 

Macro Definition Documentation

◆ IS_SIG

#define IS_SIG (   c)    ((c)->sig->signal_received)

◆ SIG_SOURCE_CONNECTION_FAILED

#define SIG_SOURCE_CONNECTION_FAILED   2

Definition at line 37 of file sig.h.

Referenced by print_signal(), and socket_connect().

◆ SIG_SOURCE_HARD

#define SIG_SOURCE_HARD   1

◆ SIG_SOURCE_SOFT

#define SIG_SOURCE_SOFT   0

Definition at line 32 of file sig.h.

Referenced by init_instance(), print_signal(), signal_reset(), and throw_signal_soft().

Function Documentation

◆ get_signal()

static void get_signal ( volatile int *  sig)
inlinestatic

◆ halt_non_edge_triggered_signals()

static void halt_non_edge_triggered_signals ( void  )
inlinestatic

◆ parse_signal()

int parse_signal ( const char *  signame)

Definition at line 63 of file sig.c.

References SIZE, signame::upper, and signame::value.

Referenced by man_signal().

◆ post_init_signal_catch()

void post_init_signal_catch ( void  )

Definition at line 255 of file sig.c.

References SIGHUP, SIGINT, SIGTERM, SIGUSR1, and SIGUSR2.

Referenced by init_instance_handle_signals(), and restore_signal_state().

◆ pre_init_signal_catch()

void pre_init_signal_catch ( void  )

Definition at line 239 of file sig.c.

References SIGHUP, SIGINT, SIGTERM, SIGUSR1, and SIGUSR2.

Referenced by init_instance_handle_signals(), openvpn_main(), and restore_signal_state().

◆ print_signal()

void print_signal ( const struct signal_info si,
const char *  title,
int  msglevel 
)

◆ print_status()

void print_status ( const struct context c,
struct status_output so 
)

◆ process_explicit_exit_notification_timer_wakeup()

void process_explicit_exit_notification_timer_wakeup ( struct context c)

◆ process_signal()

bool process_signal ( struct context c)

◆ register_signal()

void register_signal ( struct context c,
int  sig,
const char *  text 
)

◆ remap_signal()

void remap_signal ( struct context c)

◆ restore_signal_state()

void restore_signal_state ( void  )

Definition at line 272 of file sig.c.

References post_init_signal_catch(), and pre_init_signal_catch().

Referenced by possibly_become_daemon().

◆ signal_description()

const char* signal_description ( const int  signum,
const char *  sigtext 
)

Definition at line 91 of file sig.c.

References signal_name().

Referenced by do_close_tun().

◆ signal_name()

const char* signal_name ( const int  sig,
const bool  upper 
)

◆ signal_restart_status()

void signal_restart_status ( const struct signal_info si)

◆ throw_signal()

void throw_signal ( const int  signum)

◆ throw_signal_soft()

void throw_signal_soft ( const int  signum,
const char *  signal_text 
)

Variable Documentation

◆ siginfo_static

struct signal_info siginfo_static