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 52 of file mutt_signal.c.
53{
54 int save_errno = errno;
56
57 switch (sig)
58 {
59 case SIGTSTP:
60 {
62 if (!c_suspend)
63 break;
67 endwin();
68 kill(0, SIGSTOP);
69 }
71
72 case SIGCONT:
74 refresh();
76
77
79 break;
80
81 case SIGWINCH:
83 break;
84
85 case SIGINT:
87 break;
88 }
89 errno = save_errno;
90}
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
SIG_ATOMIC_VOLATILE_T SigWinch
true after SIGWINCH is received
SIG_ATOMIC_VOLATILE_T SigInt
true after SIGINT is received
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.
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 96 of file mutt_signal.c.
97{
99 endwin();
102}
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 108 of file mutt_signal.c.
109{
111 endwin();
112#ifdef USE_DEBUG_BACKTRACE
114#endif
115#ifdef USE_DEBUG_GRAPHVIZ
117#endif
118
119 struct sigaction act = { 0 };
120 sigemptyset(&act.sa_mask);
121 act.sa_flags = 0;
122 act.sa_handler = SIG_DFL;
123 sigaction(sig, &act, NULL);
124
125 raise(sig);
126}
void show_backtrace(void)
Log the program's call stack.
void dump_graphviz(const char *title, struct MailboxView *mv)