--- rpl/src/instructions_d5.c 2016/03/16 12:54:22 1.145 +++ rpl/src/instructions_d5.c 2016/03/22 19:03:36 1.149 @@ -1304,12 +1304,8 @@ instruction_detach(struct_processus *s_e liberation_queue_signaux(s_etat_processus); creation_queue_signaux(s_etat_processus); - if (lancement_thread_signaux(s_etat_processus) != d_absence_erreur) - { - (*s_etat_processus).erreur_systeme = d_es_processus; - } - routine_recursive = 0; + nombre_thread_surveillance_processus = 0; (*s_etat_processus).pointeur_signal_lecture = 0; (*s_etat_processus).pointeur_signal_ecriture = 0; @@ -2842,6 +2838,15 @@ instruction_detach(struct_processus *s_e liberation_allocateur(s_etat_processus); liberation_allocateur_buffer(s_etat_processus); + attente.tv_sec = 0; + attente.tv_nsec = GRANULARITE_us * 1000; + + while(nombre_thread_surveillance_processus != 0) + { + nanosleep(&attente, NULL); + INCR_GRANULARITE(attente.tv_nsec); + } + pthread_mutex_destroy(&((*s_etat_processus).mutex_pile_processus)); pthread_mutex_destroy(&((*s_etat_processus).mutex_allocation)); pthread_mutex_destroy(&((*s_etat_processus).mutex_interruptions));