BarryServer : Git

All the code for all my projects
// BarryServer : Git / OrionLibC / blob / fd1ac463b480044ea9b8ae4fa3f56a73b00e2ed3 / include / signal.h

// Related

OrionLibC

Barry Adding more signal functions fd1ac46 (2 years, 2 months ago)
#ifndef _SIGNAL_H
#define _SIGNAL_H

#include <sys/types.h>

typedef unsigned long int __sigset_t;
#ifndef sigset_t
typedef __sigset_t sigset_t;
#endif
#ifndef sig_atomic_t
typedef int sig_atomic_t;
#endif

typedef void (*sighandler_t)(int);

#define SIG_ERR (sighandler_t) -1
#define SIG_IGNORE 0
#define SIG_DFL 1
#define SIG_BLOCK 2
#define SIG_UNBLOCK 3
#define SIG_SETMASK 4

#ifdef __cplusplus
extern "C" {
#endif

enum Signals {
	SIGHUP = 1,
	SIGINT,
	SIGQUIT,
	SIGILL,
	SIGABRT,
	SIGFPE,
	SIGKILL,
	SIGSEGV,
	SIGPIPE,
};

int tgkill(pid_t tgid, pid_t tid, int sig);
int kill(pid_t pid, int sig);
sighandler_t signal(int signum, sighandler_t handler);
int sigprocmask(int how, const sigset_t *set, sigset_t *oldset);
int sigemptyset(sigset_t *set);
int sigfillset(sigset_t *set);
int sigaddset(sigset_t *set, int signum);
int sigdelset(sigset_t *set, int signum);
int sigismember(const sigset_t *set, int signum);

#ifdef __cplusplus
}
#endif

#endif