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 50 of file mutt_signal.c.
51{
52 int save_errno = errno;
54
55 switch (sig)
56 {
57 case SIGTSTP:
58 {
60 if (!c_suspend)
61 break;
66 kill(0, SIGSTOP);
67 }
69
70 case SIGCONT:
72 refresh();
74
75
77 break;
78
79 case SIGWINCH:
81 break;
82
83 case SIGINT:
85 break;
86 }
87 errno = save_errno;
88}
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 94 of file mutt_signal.c.
95{
100}
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 106 of file mutt_signal.c.
107{
110#ifdef USE_DEBUG_BACKTRACE
112#endif
113#ifdef USE_DEBUG_GRAPHVIZ
115#endif
116
117
120
121 struct sigaction act = { 0 };
122 sigemptyset(&act.sa_mask);
123 act.sa_flags = 0;
124 act.sa_handler = SIG_DFL;
125 sigaction(sig, &act, NULL);
126
127
128 raise(sig);
129}
void show_backtrace(void)
Log the program's call stack.
void dump_graphviz(const char *title, const struct MailboxView *mv)
Dump NeoMutt data structures to GraphViz format.
sig_handler_t OldSegvHandler
Keep the old SEGV handler, it could have been set by ASAN.