3 * - By John Hodge (thePowersGang)
6 * - POSIX Signal Emulation/Interface
11 typedef void (*sighandler_t)(int);
13 //! Atomic integer type
14 typedef volatile int sig_atomic_t;
16 #define SIG_IGN ((void*)1)
17 #define SIG_DFL ((void*)0)
18 #define SIG_ERR ((void*)-1)
20 #define SIGINT 2 // C99
21 #define SIGILL 4 // C99
22 #define SIGABRT 6 // C99
23 #define SIGFPE 8 // C99
24 #define SIGSEGV 11 // C99
25 #define SIGTERM 15 // C99
27 extern sighandler_t signal(int signum, sighandler_t handler);
29 extern int raise(int sig);
39 #define SIGSTOP 30 // Stop process
40 #define SIGTSTP 31 // ? ^Z
41 #define SIGTTIN 32 // Background process read TTY
42 #define SIGTTOU 33 // Background process write TTY
47 #include <sys/types.h> // libposix
49 typedef long long unsigned int sigset_t;
50 extern int sigemptyset(sigset_t *set);
51 extern int sigfillset(sigset_t *set);
53 typedef struct siginfo_s siginfo_t;
64 // TODO: There's others
69 sighandler_t sa_handler;
70 //void (*sa_sigaction)(int, siginfo_t *, void *);
75 #define SA_NOCLDSTOP 0x001
77 extern int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);