Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
system_signal_handling.c File Reference
#include "system/mem_alloc.h"
#include "common/sentry.h"
#include "common/system_signal_handling.h"
#include <errno.h>
#include <fcntl.h>
#include <glib.h>
#include <glib/gstdio.h>
#include <signal.h>
#include <stddef.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/prctl.h>
#include <exchndl.h>
+ Include dependency graph for system_signal_handling.c:

Go to the source code of this file.

Macros

#define PR_SET_PTRACER   0x59616d61
 
#define _NUM_SIGNALS_TO_PRESERVE   (sizeof(_signals_to_preserve) / sizeof(_signals_to_preserve[0]))
 defined (_WIN32)
 

Typedefs

typedef void() dt_signal_handler_t(int)
 

Functions

static LONG WINAPI dt_toplevel_exception_handler (PEXCEPTION_POINTERS pExceptionInfo)
 
void dt_set_unhandled_exception_handler_win ()
 
void dt_set_signal_handlers ()
 

Variables

static const int _signals_to_preserve [] = { SIGABRT, SIGFPE, SIGILL, SIGINT, SIGSEGV, SIGTERM }
 
static LPTOP_LEVEL_EXCEPTION_FILTER _dt_exceptionfilter_old_handler = NULL
 
static dt_signal_handler_t_orig_sig_handlers [(sizeof(_signals_to_preserve)/sizeof(_signals_to_preserve[0]))] = { NULL }
 
static int _times_handlers_were_set = 0
 

Macro Definition Documentation

◆ _NUM_SIGNALS_TO_PRESERVE

#define _NUM_SIGNALS_TO_PRESERVE   (sizeof(_signals_to_preserve) / sizeof(_signals_to_preserve[0]))

defined (_WIN32)

Definition at line 76 of file system_signal_handling.c.

◆ PR_SET_PTRACER

#define PR_SET_PTRACER   0x59616d61

Definition at line 55 of file system_signal_handling.c.

Typedef Documentation

◆ dt_signal_handler_t

typedef void() dt_signal_handler_t(int)

Definition at line 58 of file system_signal_handling.c.

Function Documentation

◆ dt_set_signal_handlers()

◆ dt_set_unhandled_exception_handler_win()

void dt_set_unhandled_exception_handler_win ( )

Definition at line 250 of file system_signal_handling.c.

Referenced by dt_set_signal_handlers().

◆ dt_toplevel_exception_handler()

static LONG WINAPI dt_toplevel_exception_handler ( PEXCEPTION_POINTERS  pExceptionInfo)
static

Variable Documentation

◆ _dt_exceptionfilter_old_handler

LPTOP_LEVEL_EXCEPTION_FILTER _dt_exceptionfilter_old_handler = NULL
static

◆ _orig_sig_handlers

dt_signal_handler_t* _orig_sig_handlers[(sizeof(_signals_to_preserve)/sizeof(_signals_to_preserve[0]))] = { NULL }
static

Definition at line 77 of file system_signal_handling.c.

Referenced by dt_set_signal_handlers().

◆ _signals_to_preserve

const int _signals_to_preserve[] = { SIGABRT, SIGFPE, SIGILL, SIGINT, SIGSEGV, SIGTERM }
static

Definition at line 72 of file system_signal_handling.c.

Referenced by dt_set_signal_handlers().

◆ _times_handlers_were_set

int _times_handlers_were_set = 0
static

Definition at line 199 of file system_signal_handling.c.

Referenced by dt_set_signal_handlers().