version 1.43, 2010/09/23 15:27:37
|
version 1.49, 2011/03/16 14:22:45
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.0.20 |
RPL/2 (R) version 4.0.21 |
Copyright (C) 1989-2010 Dr. BERTRAND Joël |
Copyright (C) 1989-2011 Dr. BERTRAND Joël |
|
|
This file is part of RPL/2. |
This file is part of RPL/2. |
|
|
Line 1282 instruction_detach(struct_processus *s_e
|
Line 1282 instruction_detach(struct_processus *s_e
|
} |
} |
|
|
# ifndef OS2 |
# ifndef OS2 |
|
# ifndef Cygwin |
if (pthread_attr_setschedpolicy(&attributs, SCHED_OTHER) != 0) |
if (pthread_attr_setschedpolicy(&attributs, SCHED_OTHER) != 0) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
Line 1301 instruction_detach(struct_processus *s_e
|
Line 1302 instruction_detach(struct_processus *s_e
|
return; |
return; |
} |
} |
# endif |
# endif |
|
# endif |
|
|
(*s_argument_thread).s_etat_processus = s_etat_processus; |
(*s_argument_thread).s_etat_processus = s_etat_processus; |
|
|
Line 2861 instruction_detach(struct_processus *s_e
|
Line 2863 instruction_detach(struct_processus *s_e
|
|
|
liberation(s_etat_processus, s_objet); |
liberation(s_etat_processus, s_objet); |
|
|
# if !defined(Cygwin) && !defined(OpenBSD) |
|
(*s_etat_processus).pile_signal.ss_flags = SS_DISABLE; |
|
sigaltstack(&((*s_etat_processus).pile_signal), NULL); |
|
free((*s_etat_processus).pile_signal.ss_sp); |
|
# endif |
|
|
|
free((*s_etat_processus).definitions_chainees); |
free((*s_etat_processus).definitions_chainees); |
free((*s_etat_processus).nom_fichier_historique); |
free((*s_etat_processus).nom_fichier_historique); |
|
|
Line 3021 instruction_detach(struct_processus *s_e
|
Line 3017 instruction_detach(struct_processus *s_e
|
|
|
// Être sûr que le processus fils soit déjà présent... |
// Être sûr que le processus fils soit déjà présent... |
|
|
|
attente.tv_sec = 0; |
|
attente.tv_nsec = GRANULARITE_us * 1000; |
|
|
while(kill((*s_argument_thread).pid, 0) != 0) |
while(kill((*s_argument_thread).pid, 0) != 0) |
{ |
{ |
//if ((errno != ESRCH) && (errno != EAGAIN)) |
//if ((errno != ESRCH) && (errno != EAGAIN)) |
Line 3032 instruction_detach(struct_processus *s_e
|
Line 3031 instruction_detach(struct_processus *s_e
|
} |
} |
|
|
nanosleep(&attente, NULL); |
nanosleep(&attente, NULL); |
|
INCR_GRANULARITE(attente.tv_nsec); |
} |
} |
|
|
// Le fils peut être présent sans être en attente du signal de départ. |
// Le fils peut être présent sans être en attente du signal de départ. |