2021-05-09 23:00:11 +02:00
|
|
|
#ifndef __SIGNAL_H__
|
|
|
|
# define __SIGNAL_H__
|
2020-09-17 19:27:01 +02:00
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdint.h>
|
2020-11-03 15:15:01 +01:00
|
|
|
|
2021-05-09 16:35:40 +02:00
|
|
|
#include <bits/signum.h>
|
2020-09-17 19:27:01 +02:00
|
|
|
|
2020-10-14 11:45:08 +02:00
|
|
|
/* Type of signal set */
|
|
|
|
typedef uint32_t sigset_t;
|
|
|
|
typedef uint32_t kernel_sigset_t;
|
|
|
|
|
|
|
|
/* Type of a signal handler.*/
|
2020-09-17 19:27:01 +02:00
|
|
|
typedef void (*__sighandler_t)(int);
|
|
|
|
typedef __sighandler_t sighandler_t;
|
|
|
|
|
2020-10-14 11:45:08 +02:00
|
|
|
/*
|
|
|
|
** Get the system-specific definitions of `struct sigaction' and the `SA_*'
|
|
|
|
** and `SIG_*'. constants.
|
|
|
|
*/
|
|
|
|
#include <bits/sigaction.h>
|
2020-09-17 19:27:01 +02:00
|
|
|
|
2020-10-14 11:45:08 +02:00
|
|
|
/* Get and/or change the set of blocked signals. */
|
2021-05-09 16:35:40 +02:00
|
|
|
extern int sigprocmask (int how, const sigset_t *restrict set,
|
|
|
|
sigset_t *restrict oldset);
|
2020-09-17 19:27:01 +02:00
|
|
|
|
2020-10-14 11:45:08 +02:00
|
|
|
/*
|
|
|
|
** Send signal SIG to process number PID. If PID is zero, send SIG to all
|
|
|
|
** processes in the current process's process group. If PID is < -1, send SIG to
|
|
|
|
** all processes in process group - PID.
|
|
|
|
*/
|
2020-09-17 19:27:01 +02:00
|
|
|
extern int kill(pid_t pid, int sig);
|
2020-10-14 11:45:08 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
** Set the handler for the signal SIG to HANDLER, returning the old handler, or
|
|
|
|
** SIG_ERR on error. By default `signal' has the BSD semantic.
|
|
|
|
*/
|
2020-09-17 19:27:01 +02:00
|
|
|
extern void (*signal(int signum, void (*handler)(int)))(int);
|
|
|
|
|
2021-05-09 23:00:11 +02:00
|
|
|
#endif /*__SIGNAL_H__*/
|