Prototype for a Signal Handler function.
More...
Prototype for a Signal Handler function.
- Parameters
-
sig | Signal number, e.g. SIGINT |
◆ curses_signal_handler()
static void curses_signal_handler |
( |
int |
sig | ) |
|
|
static |
Catch signals and relay the info to the main program - Implements sig_handler_t -.
- Parameters
-
sig | Signal number, e.g. SIGINT |
Definition at line 51 of file mutt_signal.c.
52{
53 int save_errno = errno;
55
56 switch (sig)
57 {
58 case SIGTSTP:
59 {
61 if (!c_suspend)
62 break;
67 kill(0, SIGSTOP);
68 }
70
71 case SIGCONT:
73 refresh();
75
76
78 break;
79
80 case SIGWINCH:
82 break;
83
84 case SIGINT:
86 break;
87 }
88 errno = save_errno;
89}
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
enum MuttCursorState mutt_curses_set_cursor(enum MuttCursorState state)
Set the cursor state.
MuttCursorState
Cursor states for mutt_curses_set_cursor()
@ MUTT_CURSOR_VISIBLE
Display a normal cursor.
static int IsEndwin
Ncurses function isendwin() has been called.
volatile sig_atomic_t SigWinch
true after SIGWINCH is received
volatile sig_atomic_t SigInt
true after SIGINT is received
Container for Accounts, Notifications.
struct ConfigSubset * sub
Inherited config items.
◆ curses_exit_handler()
static void curses_exit_handler |
( |
int |
sig | ) |
|
|
static |
Notify the user and shutdown gracefully - Implements sig_handler_t -.
- Parameters
-
sig | Signal number, e.g. SIGTERM |
Definition at line 95 of file mutt_signal.c.
96{
101}
void mutt_temp_attachments_cleanup(void)
Delete all temporary attachments.
void mutt_sig_exit_handler(int sig)
Notify the user and shutdown gracefully.
◆ curses_segv_handler()
static void curses_segv_handler |
( |
int |
sig | ) |
|
|
static |
Catch a segfault and print a backtrace - Implements sig_handler_t -.
- Parameters
-
sig | Signal number, e.g. SIGSEGV |
Definition at line 107 of file mutt_signal.c.
108{
111#ifdef USE_DEBUG_BACKTRACE
113#endif
114#ifdef USE_DEBUG_GRAPHVIZ
116#endif
117
118 struct sigaction act = { 0 };
119 sigemptyset(&act.sa_mask);
120 act.sa_flags = 0;
121 act.sa_handler = SIG_DFL;
122 sigaction(sig, &act, NULL);
123
124 raise(sig);
125}
void show_backtrace(void)
Log the program's call stack.
void dump_graphviz(const char *title, struct MailboxView *mv)