LibC: Cleanup signal.h

Make sa_handler and sa_sigaction be part of an union

Add definitions of SIGIO TRAP_BRKPT TRAP_TRACE
This commit is contained in:
Bananymous 2025-11-13 04:13:43 +02:00
parent dc2a455395
commit a44c45ff9e
1 changed files with 10 additions and 4 deletions

View File

@ -92,6 +92,7 @@ struct sigevent
#define SIGUSR1 19
#define SIGUSR2 20
#define SIGPOLL 21
#define SIGIO SIGPOLL
#define POLL_IN 1
#define POLL_OUT 2
#define POLL_MSG 3
@ -101,6 +102,8 @@ struct sigevent
#define SIGPROF 22
#define SIGSYS 23
#define SIGTRAP 24
#define TRAP_BRKPT 1
#define TRAP_TRACE 2
#define SIGURG 25
#define SIGVTALRM 26
#define SIGXCPU 27
@ -209,11 +212,14 @@ typedef struct
} siginfo_t;
struct sigaction
{
union
{
void (*sa_handler)(int); /* Pointer to a signal-catching function or one of the SIG_IGN or SIG_DFL. */
void (*sa_sigaction)(int, siginfo_t*, void*); /* Pointer to a signal-catching function. */
};
sigset_t sa_mask; /* Set of signals to be blocked during execution of the signal handling function. */
int sa_flags; /* Special flags. */
void (*sa_sigaction)(int, siginfo_t*, void*); /* Pointer to a signal-catching function. */
};
int kill(pid_t pid, int sig);