Description: Code
#ifndef _SIGNAL_H
#if !defined __need_sig_atomic_t && !defined __need_sigset_t
# define _SIGNAL_H
#endif
#include <features.h>
__BEGIN_DECLS
#include <bits/sigset.h>
#if defined __need_sig_atomic_t || defined _SIGNAL_H
# ifndef __sig_atomic_t_defined
# define __sig_atomic_t_defined
typedef __sig_atomic_t sig_atomic_t;
# endif
# undef __need_sig_atomic_t
#endif
#if defined __need_sigset_t || (defined _SIGNAL_H && defined __USE_POSIX)
# ifndef __sigset_t_defined
# define __sigset_t_defined
typedef __sigset_t sigset_t;
# endif
# undef __need_sigset_t
#endif
#ifdef _SIGNAL_H
#include <bits/types.h>
#include <bits/signum.h>
#ifdef __USE_XOPEN
# ifndef __pid_t_defined
typedef __pid_t pid_t;
# define __pid_t_defined
# endif
# ifndef __uid_t_defined
typedef __uid_t uid_t;
# define __uid_t_defined
# endif
#endif
typedef void (*__sighandler_t) (int);
extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler)
__THROW;
#ifdef __USE_GNU
extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler)
__THROW;
#endif
#ifdef __USE_BSD
extern __sighandler_t signal (int __sig, __sighandler_t __handler) __THROW;
#else
# ifdef __REDIRECT
extern __sighandler_t __REDIRECT (signal,
(int __sig,
__sighandler_t __handler) __THROW,
__sysv_signal);
# else
# define signal __sysv_signal
# endif
#endif
#ifdef __USE_XOPEN
extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler) __THROW;
#endif
#ifdef __USE_POSIX
extern int kill (__pid_t __pid, int __sig) __THROW;
#endif
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
extern int killpg (__pid_t __pgrp, int __sig) __THROW;
#endif
extern int raise (int __sig) __THROW;
#ifdef __USE_SVID
extern __sighandler_t ssignal (int __sig, __sighandler_t __handler) __THROW;
extern int gsignal (int __sig) __THROW;
#endif
#ifdef __USE_MISC
extern void psignal (int __sig, __const char *__s) __THROW;
#endif
extern int __sigpause (int __sig_or_mask, int __is_sig) __THROW;
#ifdef __USE_BSD
extern int sigpause (int __mask) __THROW;
# define sigpause(mask) __sigpause ((mask), 0)
#else
# ifdef __USE_XOPEN
# ifdef __GNUC__
extern int sigpause (int __sig) __THROW __asm__ ("__xpg_sigpause");
# endif
# define sigpause(sig) __sigpause ((sig), 1)
# endif
#endif
#ifdef __USE_BSD
# define sigmask(sig) __sigmask(sig)
extern int sigblock (int __mask) __THROW;
extern int sigsetmask (int __mask) __THROW;
extern int siggetmask (void) __THROW;
#endif
#ifdef __USE_MISC
# define NSIG _NSIG
#endif
#ifdef __USE_GNU
typedef __sighandler_t sighandler_t;
#endif
#ifdef __USE_BSD
typedef __sighandler_t sig_t;
#endif
#ifdef __USE_POSIX
# ifdef __USE_POSIX199309
# define __need_timespec
# include <time.h>
# include <bits/siginfo.h>
# endif
extern int sigemptyset (sigset_t *__set) __THROW;
extern int sigfillset (sigset_t *__set) __THROW;
extern int sigaddset (sigset_t *__set, int __signo) __THROW;
extern int sigdelset (sigset_t *__set, int __signo) __THROW;
extern int sigismember (__const sigset_t *__set, int __signo) __THROW;
# ifdef __USE_GNU
extern int sigisemptyset (__const sigset_t *__set) __THROW;
extern int sigandset (sigset_t *__set, __const sigset_t *__left,
__const sigset_t *__right) __THROW;
extern int sigorset (sigset_t *__set, __const sigset_t *__left,
__const sigset_t *__right) __THROW;
# endif
# include <bits/sigaction.h>
extern int sigprocmask (int __how, __const sigset_t *__restrict __set,
sigset_t *__restrict __oset) __THROW;
extern int sigsuspend (__const sigset_t *__set) __THROW;
extern int sigaction (int __sig, __const struct sigaction *__restrict __act,
struct sigaction *__restrict __oact) __THROW;
extern int sigpending (sigset_t *__set) __THROW;
extern int sigwait (__const sigset_t *__restrict __set, int *__restrict __sig)
__THROW;
# ifdef __USE_POSIX199309
extern int sigwaitinfo (__const sigset_t *__restrict __set,
siginfo_t *__restrict __info) __THROW;
extern int sigtimedwait (__const sigset_t *__restrict __set,
siginfo_t *__restrict __info,
__const struct timespec *__restrict __timeout)
__THROW;
extern int sigqueue (__pid_t __pid, int __sig, __const union sigval __val)
__THROW;
# endif
#endif
#ifdef __USE_BSD
extern __const char *__const _sys_siglist[_NSIG];
extern __const char *__const sys_siglist[_NSIG];
struct sigvec
{
__sighandler_t sv_handler;
int sv_mask;
int sv_flags;
# define sv_onstack sv_flags
};
# define SV_ONSTACK (1 << 0)
# define SV_INTERRUPT (1 << 1)
# define SV_RESETHAND (1 << 2)
extern int sigvec (int __sig, __const struct sigvec *__vec,
struct sigvec *__ovec) __THROW;
# include <bits/sigcontext.h>
extern int sigreturn (struct sigcontext *__scp) __THROW;
#endif
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
extern int siginterrupt (int __sig, int __interrupt) __THROW;
# include <bits/sigstack.h>
# ifdef __USE_XOPEN
# include <ucontext.h>
# endif
extern int sigstack (struct sigstack *__ss, struct sigstack *__oss) __THROW;
extern int sigaltstack (__const struct sigaltstack *__restrict __ss,
struct sigaltstack *__restrict __oss) __THROW;
#endif
#ifdef __USE_UNIX98
extern int sighold (int __sig) __THROW;
extern int sigrelse (int __sig) __THROW;
extern int sigignore (int __sig) __THROW;
extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __THROW;
#endif
#if defined __USE_POSIX199506 || defined __USE_UNIX98
# include <bits/sigthread.h>
#endif
extern int __libc_current_sigrtmin (void) __THROW;
extern int __libc_current_sigrtmax (void) __THROW;
#endif
__END_DECLS
#endif