version 1.80, 2015/02/19 11:01:30
|
version 1.91, 2016/09/27 15:29:40
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.1.21 |
RPL/2 (R) version 4.1.26 |
Copyright (C) 1989-2015 Dr. BERTRAND Joël |
Copyright (C) 1989-2016 Dr. BERTRAND Joël |
|
|
This file is part of RPL/2. |
This file is part of RPL/2. |
|
|
Line 291 localisation_courante(struct_processus *
|
Line 291 localisation_courante(struct_processus *
|
|
|
verrouillage_threads_concurrents(s_etat_processus); |
verrouillage_threads_concurrents(s_etat_processus); |
pid = fork(); |
pid = fork(); |
deverrouillage_threads_concurrents(s_etat_processus); |
|
|
|
if (pid < 0) |
if (pid < 0) |
{ |
{ |
Line 419 localisation_courante(struct_processus *
|
Line 418 localisation_courante(struct_processus *
|
} |
} |
else |
else |
{ |
{ |
|
deverrouillage_threads_concurrents(s_etat_processus); |
|
|
if (close(pipes_entree[0]) != 0) |
if (close(pipes_entree[0]) != 0) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
Line 464 localisation_courante(struct_processus *
|
Line 465 localisation_courante(struct_processus *
|
return; |
return; |
} |
} |
|
|
if (waitpid(pid, &status, 0) == -1) |
while(waitpid(pid, &status, 0) == -1) |
{ |
{ |
# ifndef SEMAPHORES_NOMMES |
if (errno != EINTR) |
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
|
{ |
{ |
if (errno != EINTR) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) |
|
!= 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
if (errno != EINTR) |
return; |
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
} |
} |
} |
|
|
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
|
} |
} |
} |
|
|
# ifndef SEMAPHORES_NOMMES |
# ifndef SEMAPHORES_NOMMES |
Line 799 std_fprintf(file *flux, const char *form
|
Line 804 std_fprintf(file *flux, const char *form
|
ios = vfprintf(flux, format, arguments); |
ios = vfprintf(flux, format, arguments); |
va_end(arguments); |
va_end(arguments); |
|
|
return(ios); |
// Pas de parenthèses pour ne pas appeler la macro. |
|
return ios; |
} |
} |
|
|
|
|