--- rpl/src/interruptions.c 2012/10/15 12:39:54 1.107 +++ rpl/src/interruptions.c 2012/10/17 10:23:16 1.108 @@ -173,7 +173,10 @@ thread_surveillance_signaux(void *argume } else { - (*s_etat_processus).erreur_systeme = d_es_processus; + if (errno != EINTR) + { + (*s_etat_processus).erreur_systeme = d_es_processus; + } } } @@ -332,10 +335,17 @@ retrait_thread(struct_processus *s_etat_ .pointeur_signal_lecture) { # if (!defined(SEMAPHORES_NOMMES)) || defined(IPCS_SYSV) - sem_wait(&((*s_queue_signaux).signalisation)); + while(sem_wait(&((*s_queue_signaux).signalisation)) != 0) # else - sem_wait(semaphore_signalisation); + while(sem_wait(semaphore_signalisation) != 0) # endif + { + if (errno != EINTR) + { + (*s_etat_processus).erreur_systeme = d_es_processus; + return; + } + } (*(*((struct_thread *) (*l_element_courant).donnee)).s_etat_processus) .pointeur_signal_lecture = ((*(*((struct_thread *) @@ -2545,10 +2555,17 @@ scrutation_interruptions(struct_processu % LONGUEUR_QUEUE_SIGNAUX; # if (!defined(SEMAPHORES_NOMMES)) || defined(IPCS_SYSV) - sem_wait(&((*s_queue_signaux).signalisation)); + while(sem_wait(&((*s_queue_signaux).signalisation)) != 0) # else - sem_wait(semaphore_signalisation); + while(sem_wait(semaphore_signalisation) != 0) # endif + { + if (errno != EINTR) + { + (*s_etat_processus).erreur_systeme = d_es_processus; + return; + } + } } # if (!defined(SEMAPHORES_NOMMES)) || defined(IPCS_SYSV) @@ -2576,10 +2593,17 @@ scrutation_interruptions(struct_processu % LONGUEUR_QUEUE_SIGNAUX; # if (!defined(SEMAPHORES_NOMMES)) || defined(IPCS_SYSV) - sem_wait(&((*s_queue_signaux).signalisation)); + while(sem_wait(&((*s_queue_signaux).signalisation)) != 0) # else - sem_wait(semaphore_signalisation); + while(sem_wait(semaphore_signalisation) != 0) # endif + { + if (errno != EINTR) + { + (*s_etat_processus).erreur_systeme = d_es_processus; + return; + } + } } pthread_mutex_unlock(&mutex_interruptions);