--- rpl/src/rpl.c 2011/09/03 10:31:50 1.80 +++ rpl/src/rpl.c 2011/09/09 12:23:25 1.81 @@ -440,6 +440,26 @@ rplinit(int argc, char *argv[], unsigned return(EXIT_FAILURE); } + signal_test = SIGTEST; + kill(getpid(), SIGINT); + + if (signal_test != SIGINT) + { + erreur = d_es_signal; + + if ((*s_etat_processus).langue == 'F') + { + printf("+++Système : Initialisation des signaux POSIX " + "impossible\n"); + } + else + { + printf("+++System : Initialization of POSIX signals failed\n"); + } + + return(EXIT_FAILURE); + } + if (sigaction(SIGTERM, &action, NULL) != 0) { erreur = d_es_signal; @@ -457,6 +477,26 @@ rplinit(int argc, char *argv[], unsigned return(EXIT_FAILURE); } + signal_test = SIGTEST; + kill(getpid(), SIGTERM); + + if (signal_test != SIGTERM) + { + erreur = d_es_signal; + + if ((*s_etat_processus).langue == 'F') + { + printf("+++Système : Initialisation des signaux POSIX " + "impossible\n"); + } + else + { + printf("+++System : Initialization of POSIX signals failed\n"); + } + + return(EXIT_FAILURE); + } + # ifndef _BROKEN_SIGINFO action.sa_sigaction = interruption2; # else @@ -479,6 +519,26 @@ rplinit(int argc, char *argv[], unsigned return(EXIT_FAILURE); } + signal_test = SIGTEST; + kill(getpid(), SIGTSTP); + + if (signal_test != SIGTSTP) + { + erreur = d_es_signal; + + if ((*s_etat_processus).langue == 'F') + { + printf("+++Système : Initialisation des signaux POSIX " + "impossible\n"); + } + else + { + printf("+++System : Initialization of POSIX signals failed\n"); + } + + return(EXIT_FAILURE); + } + # ifndef _BROKEN_SIGINFO action.sa_sigaction = interruption4; # else @@ -502,6 +562,26 @@ rplinit(int argc, char *argv[], unsigned return(EXIT_FAILURE); } + signal_test = SIGTEST; + kill(getpid(), SIGSTART); + + if (signal_test != SIGSTART) + { + erreur = d_es_signal; + + if ((*s_etat_processus).langue == 'F') + { + printf("+++Système : Initialisation des signaux POSIX " + "impossible\n"); + } + else + { + printf("+++System : Initialization of POSIX signals failed\n"); + } + + return(EXIT_FAILURE); + } + if (sigaction(SIGCONT, &action, NULL) != 0) { if ((*s_etat_processus).langue == 'F') @@ -517,6 +597,26 @@ rplinit(int argc, char *argv[], unsigned return(EXIT_FAILURE); } + signal_test = SIGTEST; + kill(getpid(), SIGCONT); + + if (signal_test != SIGCONT) + { + erreur = d_es_signal; + + if ((*s_etat_processus).langue == 'F') + { + printf("+++Système : Initialisation des signaux POSIX " + "impossible\n"); + } + else + { + printf("+++System : Initialization of POSIX signals failed\n"); + } + + return(EXIT_FAILURE); + } + # ifndef _BROKEN_SIGINFO action.sa_sigaction = interruption5; # else @@ -541,6 +641,26 @@ rplinit(int argc, char *argv[], unsigned return(EXIT_FAILURE); } + signal_test = SIGTEST; + kill(getpid(), SIGFSTOP); + + if (signal_test != SIGFSTOP) + { + erreur = d_es_signal; + + if ((*s_etat_processus).langue == 'F') + { + printf("+++Système : Initialisation des signaux POSIX " + "impossible\n"); + } + else + { + printf("+++System : Initialization of POSIX signals failed\n"); + } + + return(EXIT_FAILURE); + } + # ifndef _BROKEN_SIGINFO action.sa_sigaction = interruption11; # else @@ -565,6 +685,26 @@ rplinit(int argc, char *argv[], unsigned return(EXIT_FAILURE); } + signal_test = SIGTEST; + kill(getpid(), SIGFABORT); + + if (signal_test != SIGFABORT) + { + erreur = d_es_signal; + + if ((*s_etat_processus).langue == 'F') + { + printf("+++Système : Initialisation des signaux POSIX " + "impossible\n"); + } + else + { + printf("+++System : Initialization of POSIX signals failed\n"); + } + + return(EXIT_FAILURE); + } + # ifndef _BROKEN_SIGINFO action.sa_sigaction = interruption8; # else @@ -589,6 +729,26 @@ rplinit(int argc, char *argv[], unsigned return(EXIT_FAILURE); } + signal_test = SIGTEST; + kill(getpid(), SIGURG); + + if (signal_test != SIGURG) + { + erreur = d_es_signal; + + if ((*s_etat_processus).langue == 'F') + { + printf("+++Système : Initialisation des signaux POSIX " + "impossible\n"); + } + else + { + printf("+++System : Initialization of POSIX signals failed\n"); + } + + return(EXIT_FAILURE); + } + # ifndef _BROKEN_SIGINFO action.sa_sigaction = interruption7; # else @@ -613,6 +773,26 @@ rplinit(int argc, char *argv[], unsigned return(EXIT_FAILURE); } + signal_test = SIGTEST; + kill(getpid(), SIGPIPE); + + if (signal_test != SIGPIPE) + { + erreur = d_es_signal; + + if ((*s_etat_processus).langue == 'F') + { + printf("+++Système : Initialisation des signaux POSIX " + "impossible\n"); + } + else + { + printf("+++System : Initialization of POSIX signals failed\n"); + } + + return(EXIT_FAILURE); + } + # ifndef _BROKEN_SIGINFO action.sa_sigaction = interruption6; # else @@ -637,6 +817,26 @@ rplinit(int argc, char *argv[], unsigned return(EXIT_FAILURE); } + signal_test = SIGTEST; + kill(getpid(), SIGINJECT); + + if (signal_test != SIGINJECT) + { + erreur = d_es_signal; + + if ((*s_etat_processus).langue == 'F') + { + printf("+++Système : Initialisation des signaux POSIX " + "impossible\n"); + } + else + { + printf("+++System : Initialization of POSIX signals failed\n"); + } + + return(EXIT_FAILURE); + } + # ifndef _BROKEN_SIGINFO action.sa_sigaction = interruption9; # else @@ -661,6 +861,26 @@ rplinit(int argc, char *argv[], unsigned return(EXIT_FAILURE); } + signal_test = SIGTEST; + kill(getpid(), SIGABORT); + + if (signal_test != SIGABORT) + { + erreur = d_es_signal; + + if ((*s_etat_processus).langue == 'F') + { + printf("+++Système : Initialisation des signaux POSIX " + "impossible\n"); + } + else + { + printf("+++System : Initialization of POSIX signals failed\n"); + } + + return(EXIT_FAILURE); + } + # ifndef _BROKEN_SIGINFO action.sa_sigaction = interruption1; # else @@ -672,6 +892,26 @@ rplinit(int argc, char *argv[], unsigned { erreur = d_es_signal; + if ((*s_etat_processus).langue == 'F') + { + printf("+++Système : Initialisation des signaux POSIX " + "impossible\n"); + } + else + { + printf("+++System : Initialization of POSIX signals failed\n"); + } + + return(EXIT_FAILURE); + } + + signal_test = SIGTEST; + kill(getpid(), SIGALRM); + + if (signal_test != SIGALRM) + { + erreur = d_es_signal; + if ((*s_etat_processus).langue == 'F') { printf("+++Système : Initialisation des signaux POSIX "