--- rpl/src/rpl.c 2011/09/20 14:36:30 1.91 +++ rpl/src/rpl.c 2011/09/20 19:28:39 1.93 @@ -112,7 +112,7 @@ rplinit(int argc, char *argv[], unsigned # ifndef SEMAPHORES_NOMMES sem_init(&semaphore_gestionnaires_signaux, 0, 0); # else - semaphore_gestionnaires_signaux = sem_init2(0, getpid()); + semaphore_gestionnaires_signaux = sem_init2(0, getpid(), SEM_SIGNAUX); if (semaphore_gestionnaires_signaux == SEM_FAILED) { @@ -195,7 +195,7 @@ rplinit(int argc, char *argv[], unsigned sem_init(&((*s_etat_processus).semaphore_fork), 0, 0); # else if (((*s_etat_processus).semaphore_fork = sem_init3(0, getpid(), - pthread_self())) == SEM_FAILED) + pthread_self(), SEM_FORK)) == SEM_FAILED) { if ((*s_etat_processus).langue == 'F') { @@ -3487,11 +3487,12 @@ rplinit(int argc, char *argv[], unsigned pthread_mutex_destroy(&((*s_etat_processus).mutex_allocation)); # ifndef SEMAPHORES_NOMMES - sem_post(&((*s_etat_processus).semaphore_fork); - sem_destroy(&((*s_etat_processus).semaphore_fork); + sem_post(&((*s_etat_processus).semaphore_fork)); + sem_destroy(&((*s_etat_processus).semaphore_fork)); # else sem_post((*s_etat_processus).semaphore_fork); - sem_destroy3((*s_etat_processus).semaphore_fork, getpid(), pthread_self()); + sem_destroy3((*s_etat_processus).semaphore_fork, getpid(), pthread_self(), + SEM_FORK); # endif free((*s_etat_processus).localisation); @@ -3504,7 +3505,7 @@ rplinit(int argc, char *argv[], unsigned sem_destroy(&semaphore_gestionnaires_signaux); # else sem_post(semaphore_gestionnaires_signaux); - sem_destroy2(semaphore_gestionnaires_signaux, getpid()); + sem_destroy2(semaphore_gestionnaires_signaux, getpid(), SEM_SIGNAUX); # endif destruction_queue_signaux(s_etat_processus);