--- rpl/src/rpl.c 2010/08/18 12:56:55 1.41 +++ rpl/src/rpl.c 2010/08/22 16:38:36 1.42 @@ -189,8 +189,6 @@ rplinit(int argc, char *argv[], unsigned (*s_etat_processus).rpl_home = rpl_home; - insertion_thread(s_etat_processus, d_vrai); - pthread_mutexattr_init(&attributs_mutex); pthread_mutexattr_settype(&attributs_mutex, PTHREAD_MUTEX_NORMAL); pthread_mutex_init(&((*s_etat_processus).mutex), &attributs_mutex); @@ -251,12 +249,33 @@ rplinit(int argc, char *argv[], unsigned # ifdef _BROKEN_SIGINFO creation_fifos_signaux(s_etat_processus); + if ((*s_etat_processus).erreur_systeme != d_es) + { + if (((*s_etat_processus).localisation = malloc((strlen(d_locale) + 1) * + sizeof(unsigned char))) == NULL) + { + if ((*s_etat_processus).langue == 'F') + { + uprintf("+++Système : Mémoire insuffisante\n"); + } + else + { + uprintf("+++System : Not enough memory\n"); + } + + return(EXIT_FAILURE); + } + + strcpy((*s_etat_processus).localisation, d_locale); + } # ifdef return # undef return # endif # define return destruction_fifos_signaux(s_etat_processus); return # endif + insertion_thread(s_etat_processus, d_vrai); + localisation_courante(s_etat_processus); (*s_etat_processus).erreur_systeme = d_es; @@ -443,6 +462,7 @@ rplinit(int argc, char *argv[], unsigned # else action.sa_handler = interruption4; # endif + // SIGCONT ne doit pas pouvoir être appelé depuis son gestionnaire. action.sa_flags = SA_ONSTACK | SA_SIGINFO; if (sigaction(SIGSTART, &action, NULL) != 0) @@ -576,7 +596,7 @@ rplinit(int argc, char *argv[], unsigned # else action.sa_handler = interruption6; # endif - action.sa_flags = SA_ONSTACK | SA_SIGINFO; + action.sa_flags = SA_ONSTACK | SA_SIGINFO | SA_NODEFER; if (sigaction(SIGINJECT, &action, NULL) != 0) { @@ -600,7 +620,7 @@ rplinit(int argc, char *argv[], unsigned # else action.sa_handler = interruption9; # endif - action.sa_flags = SA_ONSTACK | SA_SIGINFO; + action.sa_flags = SA_ONSTACK | SA_SIGINFO | SA_NODEFER; if (sigaction(SIGABORT, &action, NULL) != 0) {