1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| #if (defined(UNIX_OPSYS) && !defined(sun)) || defined(IRIX53_OPSYS) || defined(AIX41_OPSYS) || defined(AIX)
# ifndef SIGTTIN
# define SIGTTIN 21
# endif
#
# ifndef SIGRTMAX
# define SIGRTMAX SIGMAX
# endif
#endif
/****************************************************************************
* @fn set_signal() - VERSION UNIX
* @date L.M.: 26-May-1998
* @brief Assign sig_handler() for all signals
****************************************************************************/
void set_signal(void)
{
struct sigaction const action = {.sa_handler = sig_handler};
for(int signo = 1; signo < SIGRTMAX; signo++)
{
if(signo != SIGTTIN && signo != SIGCHLD)
sigaction(signo, &action, NULL);
}
} |
Partager