23#ifndef MUTT_MUTT_SIGNAL2_H
24#define MUTT_MUTT_SIGNAL2_H
30#ifdef USE_DEBUG_BACKTRACE
36extern volatile sig_atomic_t
SigInt;
37extern volatile sig_atomic_t
SigWinch;
48void assertion_dump(
const char *file,
int line,
const char *func,
const char *cond);
52#define ASSERT_STOP __builtin_trap()
54#define ASSERT_STOP __debugbreak()
56#define ASSERT_STOP (*(volatile int *) 0 = 0)
63 assertion_dump(__FILE__, __LINE__, __func__, #COND); \
void mutt_sig_init(sig_handler_t sig_fn, sig_handler_t exit_fn, sig_handler_t segv_fn)
Initialise the signal handling.
void assertion_dump(const char *file, int line, const char *func, const char *cond)
Dump some debugging info before we stop the program.
volatile sig_atomic_t SigWinch
true after SIGWINCH is received
void mutt_sig_empty_handler(int sig)
Dummy signal handler.
void(* sig_handler_t)(int sig)
void mutt_sig_reset_child_signals(void)
Reset ignored signals back to the default.
volatile sig_atomic_t SigInt
true after SIGINT is received
void mutt_sig_block_system(void)
Block signals before calling exec()
void mutt_sig_block(void)
Block signals during critical operations.
void mutt_sig_unblock(void)
Restore previously blocked signals.
void mutt_sig_unblock_system(bool restore)
Restore previously blocked signals.
static void show_backtrace(void)
void mutt_sig_allow_interrupt(bool allow)
Allow/disallow Ctrl-C (SIGINT)
void mutt_sig_exit_handler(int sig)
Notify the user and shutdown gracefully.