version 1.80, 2011/09/03 10:31:50
|
version 1.82, 2011/09/10 20:45:06
|
Line 105 rplinit(int argc, char *argv[], unsigned
|
Line 105 rplinit(int argc, char *argv[], unsigned
|
volatile unsigned char traitement_fichier_temporaire; |
volatile unsigned char traitement_fichier_temporaire; |
|
|
errno = 0; |
errno = 0; |
|
pid_processus_pere = getpid(); |
|
|
# ifdef DEBUG_MEMOIRE |
# ifdef DEBUG_MEMOIRE |
debug_memoire_initialisation(); |
debug_memoire_initialisation(); |
Line 440 rplinit(int argc, char *argv[], unsigned
|
Line 441 rplinit(int argc, char *argv[], unsigned
|
return(EXIT_FAILURE); |
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) |
if (sigaction(SIGTERM, &action, NULL) != 0) |
{ |
{ |
erreur = d_es_signal; |
erreur = d_es_signal; |
Line 457 rplinit(int argc, char *argv[], unsigned
|
Line 478 rplinit(int argc, char *argv[], unsigned
|
return(EXIT_FAILURE); |
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 |
# ifndef _BROKEN_SIGINFO |
action.sa_sigaction = interruption2; |
action.sa_sigaction = interruption2; |
# else |
# else |
Line 479 rplinit(int argc, char *argv[], unsigned
|
Line 520 rplinit(int argc, char *argv[], unsigned
|
return(EXIT_FAILURE); |
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 |
# ifndef _BROKEN_SIGINFO |
action.sa_sigaction = interruption4; |
action.sa_sigaction = interruption4; |
# else |
# else |
Line 502 rplinit(int argc, char *argv[], unsigned
|
Line 563 rplinit(int argc, char *argv[], unsigned
|
return(EXIT_FAILURE); |
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 (sigaction(SIGCONT, &action, NULL) != 0) |
{ |
{ |
if ((*s_etat_processus).langue == 'F') |
if ((*s_etat_processus).langue == 'F') |
Line 517 rplinit(int argc, char *argv[], unsigned
|
Line 598 rplinit(int argc, char *argv[], unsigned
|
return(EXIT_FAILURE); |
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 |
# ifndef _BROKEN_SIGINFO |
action.sa_sigaction = interruption5; |
action.sa_sigaction = interruption5; |
# else |
# else |
Line 541 rplinit(int argc, char *argv[], unsigned
|
Line 642 rplinit(int argc, char *argv[], unsigned
|
return(EXIT_FAILURE); |
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 |
# ifndef _BROKEN_SIGINFO |
action.sa_sigaction = interruption11; |
action.sa_sigaction = interruption11; |
# else |
# else |
Line 565 rplinit(int argc, char *argv[], unsigned
|
Line 686 rplinit(int argc, char *argv[], unsigned
|
return(EXIT_FAILURE); |
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 |
# ifndef _BROKEN_SIGINFO |
action.sa_sigaction = interruption8; |
action.sa_sigaction = interruption8; |
# else |
# else |
Line 589 rplinit(int argc, char *argv[], unsigned
|
Line 730 rplinit(int argc, char *argv[], unsigned
|
return(EXIT_FAILURE); |
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 |
# ifndef _BROKEN_SIGINFO |
action.sa_sigaction = interruption7; |
action.sa_sigaction = interruption7; |
# else |
# else |
Line 613 rplinit(int argc, char *argv[], unsigned
|
Line 774 rplinit(int argc, char *argv[], unsigned
|
return(EXIT_FAILURE); |
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 |
# ifndef _BROKEN_SIGINFO |
action.sa_sigaction = interruption6; |
action.sa_sigaction = interruption6; |
# else |
# else |
Line 637 rplinit(int argc, char *argv[], unsigned
|
Line 818 rplinit(int argc, char *argv[], unsigned
|
return(EXIT_FAILURE); |
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 |
# ifndef _BROKEN_SIGINFO |
action.sa_sigaction = interruption9; |
action.sa_sigaction = interruption9; |
# else |
# else |
Line 661 rplinit(int argc, char *argv[], unsigned
|
Line 862 rplinit(int argc, char *argv[], unsigned
|
return(EXIT_FAILURE); |
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 |
# ifndef _BROKEN_SIGINFO |
action.sa_sigaction = interruption1; |
action.sa_sigaction = interruption1; |
# else |
# else |
Line 685 rplinit(int argc, char *argv[], unsigned
|
Line 906 rplinit(int argc, char *argv[], unsigned
|
return(EXIT_FAILURE); |
return(EXIT_FAILURE); |
} |
} |
|
|
# ifndef _BROKEN_SIGINFO |
signal_test = SIGTEST; |
action.sa_sigaction = interruption3; |
kill(getpid(), SIGALRM); |
# else |
|
action.sa_handler = interruption3; |
if (signal_test != SIGALRM) |
# endif |
{ |
action.sa_flags = SA_NODEFER | SA_ONSTACK | SA_SIGINFO; |
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 + 1; |
|
|
erreur = d_absence_erreur; |
erreur = d_absence_erreur; |
core = d_faux; |
core = d_faux; |
Line 1579 rplinit(int argc, char *argv[], unsigned
|
Line 1815 rplinit(int argc, char *argv[], unsigned
|
|
|
if (debug == d_faux) |
if (debug == d_faux) |
{ |
{ |
|
# ifndef _BROKEN_SIGINFO |
|
action.sa_sigaction = interruption3; |
|
# else |
|
action.sa_handler = interruption3; |
|
# endif |
|
action.sa_flags = SA_NODEFER | SA_ONSTACK | SA_SIGINFO; |
|
|
if (sigaction(SIGSEGV, &action, NULL) != 0) |
if (sigaction(SIGSEGV, &action, NULL) != 0) |
{ |
{ |
if ((*s_etat_processus).langue == 'F') |
if ((*s_etat_processus).langue == 'F') |
Line 2013 rplinit(int argc, char *argv[], unsigned
|
Line 2256 rplinit(int argc, char *argv[], unsigned
|
(*s_etat_processus).var_volatile_recursivite = 0; |
(*s_etat_processus).var_volatile_recursivite = 0; |
(*s_etat_processus).var_volatile_exception_gsl = 0; |
(*s_etat_processus).var_volatile_exception_gsl = 0; |
(*s_etat_processus).arret_depuis_abort = 0; |
(*s_etat_processus).arret_depuis_abort = 0; |
|
(*s_etat_processus).signal_a_traiter = d_faux; |
|
|
initialisation_allocateur(s_etat_processus); |
initialisation_allocateur(s_etat_processus); |
initialisation_drapeaux(s_etat_processus); |
initialisation_drapeaux(s_etat_processus); |