C-Menu 0.2.9
A User Interface Toolkit
Loading...
Searching...
No Matches
sig.c File Reference

signal handling for interrupt signals More...

#include <cm.h>
#include <execinfo.h>
#include <signal.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <termios.h>
#include <unistd.h>
Include dependency graph for sig.c:

Go to the source code of this file.

Macros

#define MAX_FRAMES   64

Functions

void sig_dfl_mode ()
 Set signal handlers to default behavior.
void sig_prog_mode ()
 Set up signal handlers for interrupt signals.
void signal_handler (int sig_num)
 Signal handler for interrupt signals.
bool handle_signal (int sig_num)
 Handle received signals and prompt user for action.

Variables

volatile sig_atomic_t sig_received = 0
bool f_curses_open = false

Detailed Description

signal handling for interrupt signals

Author
Bill Waller Copyright (c) 2025 MIT License billx.nosp@m.wall.nosp@m.er@gm.nosp@m.ail..nosp@m.com
Date
2026-02-09

Definition in file sig.c.

Macro Definition Documentation

◆ MAX_FRAMES

#define MAX_FRAMES   64

Definition at line 29 of file sig.c.

Variable Documentation

◆ f_curses_open

bool f_curses_open = false

curses mode is active

Definition at line 33 of file sig.c.

Referenced by action_disposition(), answer_yn(), destroy_curses(), display_error(), handle_signal(), open_curses(), Perror(), and wait_mk_win().

◆ sig_received

volatile sig_atomic_t sig_received = 0

Definition at line 31 of file sig.c.

Referenced by handle_signal(), popup_ckeys(), signal_handler(), and xwgetch().