Diff for /rpl/src/rpl.c between versions 1.159 and 1.208

version 1.159, 2014/07/17 08:07:26 version 1.208, 2019/02/09 13:36:42
Line 1 Line 1
 /*  /*
 ================================================================================  ================================================================================
   RPL/2 (R) version 4.1.19    RPL/2 (R) version 4.1.31
   Copyright (C) 1989-2014 Dr. BERTRAND Joël    Copyright (C) 1989-2019 Dr. BERTRAND Joël
   
   This file is part of RPL/2.    This file is part of RPL/2.
   
Line 86  rplinit(int argc, char *argv[], char *en Line 86  rplinit(int argc, char *argv[], char *en
   
     struct_processus                    *s_etat_processus;      struct_processus                    *s_etat_processus;
   
       struct_liste_chainee                *l_bibliotheques;
       struct_liste_chainee                *l_bibliotheque_courante;
       struct_liste_chainee                *l_nouvelle_bibliotheque;
   
     struct_liste_variables_partagees    *l_element_partage_courant;      struct_liste_variables_partagees    *l_element_partage_courant;
     struct_liste_variables_partagees    *l_element_partage_suivant;      struct_liste_variables_partagees    *l_element_partage_suivant;
   
Line 123  rplinit(int argc, char *argv[], char *en Line 127  rplinit(int argc, char *argv[], char *en
     errno = 0;      errno = 0;
     s_queue_signaux = NULL;      s_queue_signaux = NULL;
     routine_recursive = 0;      routine_recursive = 0;
       nombre_thread_surveillance_processus = 0;
     pid_processus_pere = getpid();      pid_processus_pere = getpid();
   
   #   ifdef DEBUG_PROC
       __proc = 0;
   #   endif
   
 #   ifdef DEBUG_MEMOIRE  #   ifdef DEBUG_MEMOIRE
     debug_memoire_initialisation();      debug_memoire_initialisation();
 #   endif  #   endif
Line 132  rplinit(int argc, char *argv[], char *en Line 141  rplinit(int argc, char *argv[], char *en
     setvbuf(stdout, NULL, _IOLBF, 0);      setvbuf(stdout, NULL, _IOLBF, 0);
     setvbuf(stderr, NULL, _IOLBF, 0);      setvbuf(stderr, NULL, _IOLBF, 0);
   
     if ((s_etat_processus = malloc(sizeof(struct_processus))) == NULL)      if ((s_etat_processus = sys_malloc(sizeof(struct_processus))) == NULL)
       {
           erreur = d_es_allocation_memoire;
   
           if ((langue = getenv("LANG")) != NULL)
           {
               if (strncmp(langue, "fr", 2) == 0)
               {
                   uprintf("+++Système : Mémoire insuffisante\n");
               }
               else
               {
                   uprintf("+++System : Not enough memory\n");
               }
           }
           else
           {
               uprintf("+++System : Not enough memory\n");
           }
   
           return(EXIT_FAILURE);
       }
   
       (*s_etat_processus).erreur_systeme = d_es;
   
       initialisation_allocateur_buffer(s_etat_processus);
   
       if ((*s_etat_processus).erreur_systeme != d_es)
       {
           erreur = d_es_allocation_memoire;
   
           if ((langue = getenv("LANG")) != NULL)
           {
               if (strncmp(langue, "fr", 2) == 0)
               {
                   uprintf("+++Système : Mémoire insuffisante\n");
               }
               else
               {
                   uprintf("+++System : Not enough memory\n");
               }
           }
           else
           {
               uprintf("+++System : Not enough memory\n");
           }
   
           return(EXIT_FAILURE);
       }
   
       if (initialisation_etat_processus_readline() != 0)
     {      {
         erreur = d_es_allocation_memoire;          erreur = d_es_allocation_memoire;
   
Line 179  rplinit(int argc, char *argv[], char *en Line 238  rplinit(int argc, char *argv[], char *en
         return(EXIT_FAILURE);          return(EXIT_FAILURE);
     }      }
   
     if ((arg_exec = malloc((((size_t) argc) + 1) * sizeof(char *))) == NULL)      if ((arg_exec = sys_malloc((((size_t) argc) + 1) * sizeof(char *))) == NULL)
     {      {
         if ((*s_etat_processus).langue == 'F')          if ((*s_etat_processus).langue == 'F')
         {          {
Line 198  rplinit(int argc, char *argv[], char *en Line 257  rplinit(int argc, char *argv[], char *en
         arg_exec[i] = argv[i];          arg_exec[i] = argv[i];
     }      }
   
     argv[argc] = NULL;      arg_exec[argc] = NULL;
   
     initialisation_contexte_cas(s_etat_processus);      initialisation_contexte_cas(s_etat_processus);
   
Line 234  rplinit(int argc, char *argv[], char *en Line 293  rplinit(int argc, char *argv[], char *en
     pthread_mutexattr_destroy(&attributs_mutex);      pthread_mutexattr_destroy(&attributs_mutex);
   
     pthread_mutexattr_init(&attributs_mutex);      pthread_mutexattr_init(&attributs_mutex);
       pthread_mutexattr_settype(&attributs_mutex, PTHREAD_MUTEX_NORMAL);
       pthread_mutex_init(&((*s_etat_processus).mutex_allocation_buffer),
               &attributs_mutex);
       pthread_mutexattr_destroy(&attributs_mutex);
   
       pthread_mutexattr_init(&attributs_mutex);
     pthread_mutexattr_settype(&attributs_mutex, PTHREAD_MUTEX_RECURSIVE);      pthread_mutexattr_settype(&attributs_mutex, PTHREAD_MUTEX_RECURSIVE);
     pthread_mutex_init(&mutex_sections_critiques, &attributs_mutex);      pthread_mutex_init(&mutex_sections_critiques, &attributs_mutex);
     pthread_mutexattr_destroy(&attributs_mutex);      pthread_mutexattr_destroy(&attributs_mutex);
Line 243  rplinit(int argc, char *argv[], char *en Line 308  rplinit(int argc, char *argv[], char *en
     pthread_mutex_init(&mutex_liste_variables_partagees, &attributs_mutex);      pthread_mutex_init(&mutex_liste_variables_partagees, &attributs_mutex);
     pthread_mutexattr_destroy(&attributs_mutex);      pthread_mutexattr_destroy(&attributs_mutex);
   
       pthread_mutexattr_init(&attributs_mutex);
       pthread_mutexattr_settype(&attributs_mutex, PTHREAD_MUTEX_RECURSIVE);
       pthread_mutex_init(&mutex_liste_threads, &attributs_mutex);
       pthread_mutexattr_destroy(&attributs_mutex);
   
 #   ifndef SEMAPHORES_NOMMES  #   ifndef SEMAPHORES_NOMMES
         sem_init(&((*s_etat_processus).semaphore_fork), 0, 0);          sem_init(&((*s_etat_processus).semaphore_fork), 0, 0);
 #   else  #   else
Line 320  rplinit(int argc, char *argv[], char *en Line 390  rplinit(int argc, char *argv[], char *en
 #           endif  #           endif
   
             liberation_contexte_cas(s_etat_processus);              liberation_contexte_cas(s_etat_processus);
             liberation_queue_signaux(s_etat_processus);              destruction_queue_signaux(s_etat_processus);
   
             if ((*s_etat_processus).langue == 'F')              if ((*s_etat_processus).langue == 'F')
             {              {
Line 354  rplinit(int argc, char *argv[], char *en Line 424  rplinit(int argc, char *argv[], char *en
 #           endif  #           endif
   
             liberation_contexte_cas(s_etat_processus);              liberation_contexte_cas(s_etat_processus);
             liberation_queue_signaux(s_etat_processus);              destruction_queue_signaux(s_etat_processus);
   
             if ((*s_etat_processus).langue == 'F')              if ((*s_etat_processus).langue == 'F')
             {              {
Line 379  rplinit(int argc, char *argv[], char *en Line 449  rplinit(int argc, char *argv[], char *en
   
         if ((*s_etat_processus).langue == 'F')          if ((*s_etat_processus).langue == 'F')
         {          {
             printf("+++Copyright (C) 1989 à 2013, 2014 BERTRAND Joël\n");              printf("+++Copyright (C) 1989 à 2018, 2019 BERTRAND Joël\n");
         }          }
         else          else
         {          {
             printf("+++Copyright (C) 1989 to 2013, 2014 BERTRAND Joel\n");              printf("+++Copyright (C) 1989 to 2018, 2019 BERTRAND Joel\n");
         }          }
     }      }
   
Line 423  rplinit(int argc, char *argv[], char *en Line 493  rplinit(int argc, char *argv[], char *en
 #           endif  #           endif
   
             liberation_contexte_cas(s_etat_processus);              liberation_contexte_cas(s_etat_processus);
             liberation_queue_signaux(s_etat_processus);              destruction_queue_signaux(s_etat_processus);
   
             erreur = d_es_signal;              erreur = d_es_signal;
   
Line 453  rplinit(int argc, char *argv[], char *en Line 523  rplinit(int argc, char *argv[], char *en
         }          }
 #   endif  #   endif
   
     if (lancement_thread_signaux(s_etat_processus) != d_absence_erreur)  
     {  
 #       ifndef SEMAPHORES_NOMMES  
             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_FORK);  
 #       endif  
   
         liberation_contexte_cas(s_etat_processus);  
         liberation_queue_signaux(s_etat_processus);  
   
 #       ifdef HAVE_STACK_OVERFLOW_RECOVERY  
             stackoverflow_deinstall_handler();  
 #       endif  
   
         erreur = d_es_signal;  
   
         if ((*s_etat_processus).langue == 'F')  
         {  
             printf("+++Système : Initialisation des signaux POSIX "  
                     "impossible\n");  
         }  
         else  
         {  
             printf("+++System : Initialization of POSIX signals failed\n");  
         }  
   
         return(EXIT_FAILURE);  
     }  
   
     action.sa_handler = interruption1;      action.sa_handler = interruption1;
     action.sa_flags = 0;      action.sa_flags = 0;
   
Line 501  rplinit(int argc, char *argv[], char *en Line 538  rplinit(int argc, char *argv[], char *en
 #       endif  #       endif
   
         liberation_contexte_cas(s_etat_processus);          liberation_contexte_cas(s_etat_processus);
         liberation_queue_signaux(s_etat_processus);          destruction_queue_signaux(s_etat_processus);
   
 #       ifdef HAVE_STACK_OVERFLOW_RECOVERY  #       ifdef HAVE_STACK_OVERFLOW_RECOVERY
             stackoverflow_deinstall_handler();              stackoverflow_deinstall_handler();
Line 545  rplinit(int argc, char *argv[], char *en Line 582  rplinit(int argc, char *argv[], char *en
 #       endif  #       endif
   
         liberation_contexte_cas(s_etat_processus);          liberation_contexte_cas(s_etat_processus);
         liberation_queue_signaux(s_etat_processus);          destruction_queue_signaux(s_etat_processus);
   
 #       ifdef HAVE_STACK_OVERFLOW_RECOVERY  #       ifdef HAVE_STACK_OVERFLOW_RECOVERY
             stackoverflow_deinstall_handler();              stackoverflow_deinstall_handler();
Line 578  rplinit(int argc, char *argv[], char *en Line 615  rplinit(int argc, char *argv[], char *en
 #       endif  #       endif
   
         liberation_contexte_cas(s_etat_processus);          liberation_contexte_cas(s_etat_processus);
         liberation_queue_signaux(s_etat_processus);          destruction_queue_signaux(s_etat_processus);
   
 #       ifdef HAVE_STACK_OVERFLOW_RECOVERY  #       ifdef HAVE_STACK_OVERFLOW_RECOVERY
             stackoverflow_deinstall_handler();              stackoverflow_deinstall_handler();
Line 622  rplinit(int argc, char *argv[], char *en Line 659  rplinit(int argc, char *argv[], char *en
 #       endif  #       endif
   
         liberation_contexte_cas(s_etat_processus);          liberation_contexte_cas(s_etat_processus);
         liberation_queue_signaux(s_etat_processus);          destruction_queue_signaux(s_etat_processus);
   
 #       ifdef HAVE_STACK_OVERFLOW_RECOVERY  #       ifdef HAVE_STACK_OVERFLOW_RECOVERY
             stackoverflow_deinstall_handler();              stackoverflow_deinstall_handler();
Line 643  rplinit(int argc, char *argv[], char *en Line 680  rplinit(int argc, char *argv[], char *en
         return(EXIT_FAILURE);          return(EXIT_FAILURE);
     }      }
   
     if (sigaction(SIGALRM, &action, NULL) != 0)      if (sigaction(SIGUSR2, &action, NULL) != 0)
     {      {
 #       ifndef SEMAPHORES_NOMMES  #       ifndef SEMAPHORES_NOMMES
             sem_post(&((*s_etat_processus).semaphore_fork));              sem_post(&((*s_etat_processus).semaphore_fork));
Line 655  rplinit(int argc, char *argv[], char *en Line 692  rplinit(int argc, char *argv[], char *en
 #       endif  #       endif
   
         liberation_contexte_cas(s_etat_processus);          liberation_contexte_cas(s_etat_processus);
         liberation_queue_signaux(s_etat_processus);          destruction_queue_signaux(s_etat_processus);
   
 #       ifdef HAVE_STACK_OVERFLOW_RECOVERY  #       ifdef HAVE_STACK_OVERFLOW_RECOVERY
             stackoverflow_deinstall_handler();              stackoverflow_deinstall_handler();
Line 677  rplinit(int argc, char *argv[], char *en Line 714  rplinit(int argc, char *argv[], char *en
     }      }
   
     signal_test = SIGTEST;      signal_test = SIGTEST;
     raise(SIGALRM);      raise(SIGUSR2);
   
     attente.tv_sec = 0;      attente.tv_sec = 0;
     attente.tv_nsec = 1000000;      attente.tv_nsec = 1000000;
Line 687  rplinit(int argc, char *argv[], char *en Line 724  rplinit(int argc, char *argv[], char *en
         nanosleep(&attente, NULL);          nanosleep(&attente, NULL);
     }      }
   
     if (signal_test != SIGALRM)      if (signal_test != SIGUSR2)
     {      {
 #       ifndef SEMAPHORES_NOMMES  #       ifndef SEMAPHORES_NOMMES
             sem_post(&((*s_etat_processus).semaphore_fork));              sem_post(&((*s_etat_processus).semaphore_fork));
Line 699  rplinit(int argc, char *argv[], char *en Line 736  rplinit(int argc, char *argv[], char *en
 #       endif  #       endif
   
         liberation_contexte_cas(s_etat_processus);          liberation_contexte_cas(s_etat_processus);
         liberation_queue_signaux(s_etat_processus);          destruction_queue_signaux(s_etat_processus);
   
 #       ifdef HAVE_STACK_OVERFLOW_RECOVERY  #       ifdef HAVE_STACK_OVERFLOW_RECOVERY
             stackoverflow_deinstall_handler();              stackoverflow_deinstall_handler();
Line 735  rplinit(int argc, char *argv[], char *en Line 772  rplinit(int argc, char *argv[], char *en
 #       endif  #       endif
   
         liberation_contexte_cas(s_etat_processus);          liberation_contexte_cas(s_etat_processus);
         liberation_queue_signaux(s_etat_processus);          destruction_queue_signaux(s_etat_processus);
   
 #       ifdef HAVE_STACK_OVERFLOW_RECOVERY  #       ifdef HAVE_STACK_OVERFLOW_RECOVERY
             stackoverflow_deinstall_handler();              stackoverflow_deinstall_handler();
Line 777  rplinit(int argc, char *argv[], char *en Line 814  rplinit(int argc, char *argv[], char *en
 #       endif  #       endif
   
         liberation_contexte_cas(s_etat_processus);          liberation_contexte_cas(s_etat_processus);
         liberation_queue_signaux(s_etat_processus);          destruction_queue_signaux(s_etat_processus);
   
 #       ifdef HAVE_STACK_OVERFLOW_RECOVERY  #       ifdef HAVE_STACK_OVERFLOW_RECOVERY
             stackoverflow_deinstall_handler();              stackoverflow_deinstall_handler();
Line 813  rplinit(int argc, char *argv[], char *en Line 850  rplinit(int argc, char *argv[], char *en
 #       endif  #       endif
   
         liberation_contexte_cas(s_etat_processus);          liberation_contexte_cas(s_etat_processus);
         liberation_queue_signaux(s_etat_processus);          destruction_queue_signaux(s_etat_processus);
   
 #       ifdef HAVE_STACK_OVERFLOW_RECOVERY  #       ifdef HAVE_STACK_OVERFLOW_RECOVERY
             stackoverflow_deinstall_handler();              stackoverflow_deinstall_handler();
Line 857  rplinit(int argc, char *argv[], char *en Line 894  rplinit(int argc, char *argv[], char *en
 #       endif  #       endif
   
         liberation_contexte_cas(s_etat_processus);          liberation_contexte_cas(s_etat_processus);
         liberation_queue_signaux(s_etat_processus);          destruction_queue_signaux(s_etat_processus);
   
 #       ifdef HAVE_STACK_OVERFLOW_RECOVERY  #       ifdef HAVE_STACK_OVERFLOW_RECOVERY
             stackoverflow_deinstall_handler();              stackoverflow_deinstall_handler();
Line 893  rplinit(int argc, char *argv[], char *en Line 930  rplinit(int argc, char *argv[], char *en
 #       endif  #       endif
   
         liberation_contexte_cas(s_etat_processus);          liberation_contexte_cas(s_etat_processus);
         liberation_queue_signaux(s_etat_processus);          destruction_queue_signaux(s_etat_processus);
   
 #       ifdef HAVE_STACK_OVERFLOW_RECOVERY  #       ifdef HAVE_STACK_OVERFLOW_RECOVERY
             stackoverflow_deinstall_handler();              stackoverflow_deinstall_handler();
Line 937  rplinit(int argc, char *argv[], char *en Line 974  rplinit(int argc, char *argv[], char *en
 #       endif  #       endif
   
         liberation_contexte_cas(s_etat_processus);          liberation_contexte_cas(s_etat_processus);
         liberation_queue_signaux(s_etat_processus);          destruction_queue_signaux(s_etat_processus);
   
 #       ifdef HAVE_STACK_OVERFLOW_RECOVERY  #       ifdef HAVE_STACK_OVERFLOW_RECOVERY
             stackoverflow_deinstall_handler();              stackoverflow_deinstall_handler();
Line 971  rplinit(int argc, char *argv[], char *en Line 1008  rplinit(int argc, char *argv[], char *en
     drapeau_encart = 'Y';      drapeau_encart = 'Y';
     debug = d_faux;      debug = d_faux;
     arguments = NULL;      arguments = NULL;
       l_bibliotheques = NULL;
   
     (*s_etat_processus).s_fichiers = NULL;      (*s_etat_processus).s_fichiers = NULL;
     (*s_etat_processus).s_sockets = NULL;      (*s_etat_processus).s_sockets = NULL;
Line 1038  rplinit(int argc, char *argv[], char *en Line 1076  rplinit(int argc, char *argv[], char *en
 #                               endif  #                               endif
   
                                 liberation_contexte_cas(s_etat_processus);                                  liberation_contexte_cas(s_etat_processus);
                                 liberation_queue_signaux(s_etat_processus);                                  destruction_queue_signaux(s_etat_processus);
   
 #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                 stackoverflow_deinstall_handler();                                  stackoverflow_deinstall_handler();
Line 1077  rplinit(int argc, char *argv[], char *en Line 1115  rplinit(int argc, char *argv[], char *en
 #                               endif  #                               endif
   
                                 liberation_contexte_cas(s_etat_processus);                                  liberation_contexte_cas(s_etat_processus);
                                 liberation_queue_signaux(s_etat_processus);                                  destruction_queue_signaux(s_etat_processus);
   
 #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                 stackoverflow_deinstall_handler();                                  stackoverflow_deinstall_handler();
Line 1121  rplinit(int argc, char *argv[], char *en Line 1159  rplinit(int argc, char *argv[], char *en
 #                                   endif  #                                   endif
   
                                     liberation_contexte_cas(s_etat_processus);                                      liberation_contexte_cas(s_etat_processus);
                                     liberation_queue_signaux(s_etat_processus);                                      destruction_queue_signaux(s_etat_processus);
   
 #                                   ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                                   ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                     stackoverflow_deinstall_handler();                                      stackoverflow_deinstall_handler();
Line 1177  rplinit(int argc, char *argv[], char *en Line 1215  rplinit(int argc, char *argv[], char *en
 #                                   endif  #                                   endif
   
                                     liberation_contexte_cas(s_etat_processus);                                      liberation_contexte_cas(s_etat_processus);
                                     liberation_queue_signaux(s_etat_processus);                                      destruction_queue_signaux(s_etat_processus);
   
 #                                   ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                                   ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                     stackoverflow_deinstall_handler();                                      stackoverflow_deinstall_handler();
Line 1225  rplinit(int argc, char *argv[], char *en Line 1263  rplinit(int argc, char *argv[], char *en
 #                               endif  #                               endif
   
                                 liberation_contexte_cas(s_etat_processus);                                  liberation_contexte_cas(s_etat_processus);
                                 liberation_queue_signaux(s_etat_processus);                                  destruction_queue_signaux(s_etat_processus);
   
 #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                 stackoverflow_deinstall_handler();                                  stackoverflow_deinstall_handler();
Line 1263  rplinit(int argc, char *argv[], char *en Line 1301  rplinit(int argc, char *argv[], char *en
 #                               endif  #                               endif
   
                                 liberation_contexte_cas(s_etat_processus);                                  liberation_contexte_cas(s_etat_processus);
                                 liberation_queue_signaux(s_etat_processus);                                  destruction_queue_signaux(s_etat_processus);
   
 #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                 stackoverflow_deinstall_handler();                                  stackoverflow_deinstall_handler();
Line 1303  rplinit(int argc, char *argv[], char *en Line 1341  rplinit(int argc, char *argv[], char *en
 #                               endif  #                               endif
   
                                 liberation_contexte_cas(s_etat_processus);                                  liberation_contexte_cas(s_etat_processus);
                                 liberation_queue_signaux(s_etat_processus);                                  destruction_queue_signaux(s_etat_processus);
   
 #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                 stackoverflow_deinstall_handler();                                  stackoverflow_deinstall_handler();
Line 1343  rplinit(int argc, char *argv[], char *en Line 1381  rplinit(int argc, char *argv[], char *en
 #                               endif  #                               endif
   
                                 liberation_contexte_cas(s_etat_processus);                                  liberation_contexte_cas(s_etat_processus);
                                 liberation_queue_signaux(s_etat_processus);                                  destruction_queue_signaux(s_etat_processus);
   
 #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                 stackoverflow_deinstall_handler();                                  stackoverflow_deinstall_handler();
Line 1382  rplinit(int argc, char *argv[], char *en Line 1420  rplinit(int argc, char *argv[], char *en
 #                               endif  #                               endif
   
                                 liberation_contexte_cas(s_etat_processus);                                  liberation_contexte_cas(s_etat_processus);
                                 liberation_queue_signaux(s_etat_processus);                                  destruction_queue_signaux(s_etat_processus);
   
 #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                 stackoverflow_deinstall_handler();                                  stackoverflow_deinstall_handler();
Line 1422  rplinit(int argc, char *argv[], char *en Line 1460  rplinit(int argc, char *argv[], char *en
 #                               endif  #                               endif
   
                                 liberation_contexte_cas(s_etat_processus);                                  liberation_contexte_cas(s_etat_processus);
                                 liberation_queue_signaux(s_etat_processus);                                  destruction_queue_signaux(s_etat_processus);
   
 #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                 stackoverflow_deinstall_handler();                                  stackoverflow_deinstall_handler();
Line 1454  rplinit(int argc, char *argv[], char *en Line 1492  rplinit(int argc, char *argv[], char *en
 #                               endif  #                               endif
   
                                 liberation_contexte_cas(s_etat_processus);                                  liberation_contexte_cas(s_etat_processus);
                                 liberation_queue_signaux(s_etat_processus);                                  destruction_queue_signaux(s_etat_processus);
   
 #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                 stackoverflow_deinstall_handler();                                  stackoverflow_deinstall_handler();
Line 1486  rplinit(int argc, char *argv[], char *en Line 1524  rplinit(int argc, char *argv[], char *en
 #                               endif  #                               endif
   
                                 liberation_contexte_cas(s_etat_processus);                                  liberation_contexte_cas(s_etat_processus);
                                 liberation_queue_signaux(s_etat_processus);                                  destruction_queue_signaux(s_etat_processus);
   
 #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                 stackoverflow_deinstall_handler();                                  stackoverflow_deinstall_handler();
Line 1527  rplinit(int argc, char *argv[], char *en Line 1565  rplinit(int argc, char *argv[], char *en
 #                               endif  #                               endif
   
                                 liberation_contexte_cas(s_etat_processus);                                  liberation_contexte_cas(s_etat_processus);
                                 liberation_queue_signaux(s_etat_processus);                                  destruction_queue_signaux(s_etat_processus);
   
 #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                 stackoverflow_deinstall_handler();                                  stackoverflow_deinstall_handler();
Line 1561  rplinit(int argc, char *argv[], char *en Line 1599  rplinit(int argc, char *argv[], char *en
                             break;                              break;
                         }                          }
   
                           case 'm' :
                           {
                               while(*(++argv[0]) == ' ');
                               argv[0]--;
   
                               if ((*(++argv[0])) != '\0')
                               {
                                   if ((l_nouvelle_bibliotheque = malloc(
                                           sizeof(struct_liste_chainee))) == NULL)
                                   {
   #                                   ifndef SEMAPHORES_NOMMES
                                       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_FORK);
   #                                   endif
   
                                       liberation_contexte_cas(s_etat_processus);
                                       destruction_queue_signaux(s_etat_processus);
   
   #                                   ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                       stackoverflow_deinstall_handler();
   #                                   endif
   
                                       if ((*s_etat_processus).langue == 'F')
                                       {
                                           printf("+++Système : Mémoire "
                                                   "insuffisante\n");
                                       }
                                       else
                                       {
                                           printf("+++System : Not enough "
                                                   "memory\n");
                                       }
   
                                       return(EXIT_FAILURE);
                                   }
   
                                   (*l_nouvelle_bibliotheque).suivant =
                                           l_bibliotheques;
   
                                   if (((*l_nouvelle_bibliotheque).donnee =
                                           allocation(s_etat_processus, CHN))
                                           == NULL)
                                   {
   #                                   ifndef SEMAPHORES_NOMMES
                                       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_FORK);
   #                                   endif
   
                                       liberation_contexte_cas(s_etat_processus);
                                       destruction_queue_signaux(s_etat_processus);
   
   #                                   ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                       stackoverflow_deinstall_handler();
   #                                   endif
   
                                       if ((*s_etat_processus).langue == 'F')
                                       {
                                           printf("+++Système : Mémoire "
                                                   "insuffisante\n");
                                       }
                                       else
                                       {
                                           printf("+++System : Not enough "
                                                   "memory\n");
                                       }
   
                                       return(EXIT_FAILURE);
                                   }
   
                                   if (((*(*l_nouvelle_bibliotheque).donnee)
                                           .objet = malloc((strlen(argv[0]) + 1) *
                                           sizeof(unsigned char))) == NULL)
                                   {
   #                                   ifndef SEMAPHORES_NOMMES
                                       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_FORK);
   #                                   endif
   
                                       liberation_contexte_cas(s_etat_processus);
                                       destruction_queue_signaux(s_etat_processus);
   
   #                                   ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                       stackoverflow_deinstall_handler();
   #                                   endif
   
                                       if ((*s_etat_processus).langue == 'F')
                                       {
                                           printf("+++Système : Mémoire "
                                                   "insuffisante\n");
                                       }
                                       else
                                       {
                                           printf("+++System : Not enough "
                                                   "memory\n");
                                       }
   
                                       return(EXIT_FAILURE);
                                   }
   
                                   strcpy((*(*l_nouvelle_bibliotheque).donnee)
                                           .objet, argv[0]);
                                   argv[0] += strlen((unsigned char *)
                                           (*(*l_nouvelle_bibliotheque).donnee)
                                           .objet) - 1;
   
                                   l_bibliotheques = l_nouvelle_bibliotheque;
                               }
                               else if ((--argc) > 0)
                               {
                                   argv++;
   
                                   if ((l_nouvelle_bibliotheque = malloc(
                                           sizeof(struct_liste_chainee))) == NULL)
                                   {
   #                                   ifndef SEMAPHORES_NOMMES
                                       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_FORK);
   #                                   endif
   
                                       liberation_contexte_cas(s_etat_processus);
                                       destruction_queue_signaux(s_etat_processus);
   
   #                                   ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                       stackoverflow_deinstall_handler();
   #                                   endif
   
                                       if ((*s_etat_processus).langue == 'F')
                                       {
                                           printf("+++Système : Mémoire "
                                                   "insuffisante\n");
                                       }
                                       else
                                       {
                                           printf("+++System : Not enough "
                                                   "memory\n");
                                       }
   
                                       return(EXIT_FAILURE);
                                   }
   
                                   (*l_nouvelle_bibliotheque).suivant =
                                           l_bibliotheques;
   
                                   if (((*l_nouvelle_bibliotheque).donnee =
                                           allocation(s_etat_processus, CHN))
                                           == NULL)
                                   {
   #                                   ifndef SEMAPHORES_NOMMES
                                       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_FORK);
   #                                   endif
   
                                       liberation_contexte_cas(s_etat_processus);
                                       destruction_queue_signaux(s_etat_processus);
   
   #                                   ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                       stackoverflow_deinstall_handler();
   #                                   endif
   
                                       if ((*s_etat_processus).langue == 'F')
                                       {
                                           printf("+++Système : Mémoire "
                                                   "insuffisante\n");
                                       }
                                       else
                                       {
                                           printf("+++System : Not enough "
                                                   "memory\n");
                                       }
   
                                       return(EXIT_FAILURE);
                                   }
   
                                   if (((*(*l_nouvelle_bibliotheque).donnee)
                                           .objet = malloc((strlen(argv[0]) + 1) *
                                           sizeof(unsigned char))) == NULL)
                                   {
   #                                   ifndef SEMAPHORES_NOMMES
                                       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_FORK);
   #                                   endif
   
                                       liberation_contexte_cas(s_etat_processus);
                                       destruction_queue_signaux(s_etat_processus);
   
   #                                   ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                       stackoverflow_deinstall_handler();
   #                                   endif
   
                                       if ((*s_etat_processus).langue == 'F')
                                       {
                                           printf("+++Système : Mémoire "
                                                   "insuffisante\n");
                                       }
                                       else
                                       {
                                           printf("+++System : Not enough "
                                                   "memory\n");
                                       }
   
                                       return(EXIT_FAILURE);
                                   }
   
                                   strcpy((*(*l_nouvelle_bibliotheque).donnee)
                                           .objet, argv[0]);
                                   argv[0] += strlen((unsigned char *)
                                           (*(*l_nouvelle_bibliotheque).donnee)
                                           .objet) - 1;
   
                                   l_bibliotheques = l_nouvelle_bibliotheque;
                               }
                               else
                               {
   #                               ifndef SEMAPHORES_NOMMES
                                   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_FORK);
   #                               endif
   
                                   liberation_contexte_cas(s_etat_processus);
                                   destruction_queue_signaux(s_etat_processus);
   
   #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                   stackoverflow_deinstall_handler();
   #                               endif
   
                                   if ((*s_etat_processus).langue == 'F')
                                   {
                                       printf("+++Erreur : Aucune bibliothèque "
                                               "spécifiée après l'option -A\n");
                                   }
                                   else
                                   {
                                       printf("+++Error : Library required after "
                                               "-m option\n");
                                   }
   
                                   return(EXIT_FAILURE);
                               }
   
                               break;
                           }
   
                         case 'n' :                          case 'n' :
                         {                          {
                             if (option_n == d_vrai)                              if (option_n == d_vrai)
Line 1576  rplinit(int argc, char *argv[], char *en Line 1909  rplinit(int argc, char *argv[], char *en
 #                               endif  #                               endif
   
                                 liberation_contexte_cas(s_etat_processus);                                  liberation_contexte_cas(s_etat_processus);
                                 liberation_queue_signaux(s_etat_processus);                                  destruction_queue_signaux(s_etat_processus);
   
 #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                 stackoverflow_deinstall_handler();                                  stackoverflow_deinstall_handler();
Line 1616  rplinit(int argc, char *argv[], char *en Line 1949  rplinit(int argc, char *argv[], char *en
 #                               endif  #                               endif
   
                                 liberation_contexte_cas(s_etat_processus);                                  liberation_contexte_cas(s_etat_processus);
                                 liberation_queue_signaux(s_etat_processus);                                  destruction_queue_signaux(s_etat_processus);
   
 #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                 stackoverflow_deinstall_handler();                                  stackoverflow_deinstall_handler();
Line 1648  rplinit(int argc, char *argv[], char *en Line 1981  rplinit(int argc, char *argv[], char *en
 #                               endif  #                               endif
   
                                 liberation_contexte_cas(s_etat_processus);                                  liberation_contexte_cas(s_etat_processus);
                                 liberation_queue_signaux(s_etat_processus);                                  destruction_queue_signaux(s_etat_processus);
   
 #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                 stackoverflow_deinstall_handler();                                  stackoverflow_deinstall_handler();
Line 1688  rplinit(int argc, char *argv[], char *en Line 2021  rplinit(int argc, char *argv[], char *en
 #                               endif  #                               endif
   
                                 liberation_contexte_cas(s_etat_processus);                                  liberation_contexte_cas(s_etat_processus);
                                 liberation_queue_signaux(s_etat_processus);                                  destruction_queue_signaux(s_etat_processus);
   
 #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                 stackoverflow_deinstall_handler();                                  stackoverflow_deinstall_handler();
Line 1728  rplinit(int argc, char *argv[], char *en Line 2061  rplinit(int argc, char *argv[], char *en
 #                               endif  #                               endif
   
                                 liberation_contexte_cas(s_etat_processus);                                  liberation_contexte_cas(s_etat_processus);
                                 liberation_queue_signaux(s_etat_processus);                                  destruction_queue_signaux(s_etat_processus);
   
 #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                 stackoverflow_deinstall_handler();                                  stackoverflow_deinstall_handler();
Line 1768  rplinit(int argc, char *argv[], char *en Line 2101  rplinit(int argc, char *argv[], char *en
 #                               endif  #                               endif
   
                                 liberation_contexte_cas(s_etat_processus);                                  liberation_contexte_cas(s_etat_processus);
                                 liberation_queue_signaux(s_etat_processus);                                  destruction_queue_signaux(s_etat_processus);
   
 #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                 stackoverflow_deinstall_handler();                                  stackoverflow_deinstall_handler();
Line 1800  rplinit(int argc, char *argv[], char *en Line 2133  rplinit(int argc, char *argv[], char *en
 #                               endif  #                               endif
   
                                 liberation_contexte_cas(s_etat_processus);                                  liberation_contexte_cas(s_etat_processus);
                                 liberation_queue_signaux(s_etat_processus);                                  destruction_queue_signaux(s_etat_processus);
   
 #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                 stackoverflow_deinstall_handler();                                  stackoverflow_deinstall_handler();
Line 1845  rplinit(int argc, char *argv[], char *en Line 2178  rplinit(int argc, char *argv[], char *en
 #                                   endif  #                                   endif
   
                                     liberation_contexte_cas(s_etat_processus);                                      liberation_contexte_cas(s_etat_processus);
                                     liberation_queue_signaux(s_etat_processus);                                      destruction_queue_signaux(s_etat_processus);
   
 #                                   ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                                   ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                     stackoverflow_deinstall_handler();                                      stackoverflow_deinstall_handler();
Line 1899  rplinit(int argc, char *argv[], char *en Line 2232  rplinit(int argc, char *argv[], char *en
 #                                   endif  #                                   endif
   
                                     liberation_contexte_cas(s_etat_processus);                                      liberation_contexte_cas(s_etat_processus);
                                     liberation_queue_signaux(s_etat_processus);                                      destruction_queue_signaux(s_etat_processus);
   
 #                                   ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                                   ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                     stackoverflow_deinstall_handler();                                      stackoverflow_deinstall_handler();
Line 1944  rplinit(int argc, char *argv[], char *en Line 2277  rplinit(int argc, char *argv[], char *en
 #                               endif  #                               endif
   
                                 liberation_contexte_cas(s_etat_processus);                                  liberation_contexte_cas(s_etat_processus);
                                 liberation_queue_signaux(s_etat_processus);                                  destruction_queue_signaux(s_etat_processus);
   
 #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                 stackoverflow_deinstall_handler();                                  stackoverflow_deinstall_handler();
Line 1965  rplinit(int argc, char *argv[], char *en Line 2298  rplinit(int argc, char *argv[], char *en
                             }                              }
   
                             if (((*s_etat_processus).definitions_chainees =                              if (((*s_etat_processus).definitions_chainees =
                                     compactage((*s_etat_processus)                                      compactage(s_etat_processus,
                                     .definitions_chainees)) == NULL)                                      (*s_etat_processus).definitions_chainees))
                                       == NULL)
                             {                              {
 #                               ifndef SEMAPHORES_NOMMES  #                               ifndef SEMAPHORES_NOMMES
                                 sem_post(&((*s_etat_processus).semaphore_fork));                                  sem_post(&((*s_etat_processus).semaphore_fork));
Line 1979  rplinit(int argc, char *argv[], char *en Line 2313  rplinit(int argc, char *argv[], char *en
 #                               endif  #                               endif
   
                                 liberation_contexte_cas(s_etat_processus);                                  liberation_contexte_cas(s_etat_processus);
                                 liberation_queue_signaux(s_etat_processus);                                  destruction_queue_signaux(s_etat_processus);
   
 #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                 stackoverflow_deinstall_handler();                                  stackoverflow_deinstall_handler();
Line 2021  rplinit(int argc, char *argv[], char *en Line 2355  rplinit(int argc, char *argv[], char *en
 #                               endif  #                               endif
   
                                 liberation_contexte_cas(s_etat_processus);                                  liberation_contexte_cas(s_etat_processus);
                                 liberation_queue_signaux(s_etat_processus);                                  destruction_queue_signaux(s_etat_processus);
   
 #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                 stackoverflow_deinstall_handler();                                  stackoverflow_deinstall_handler();
Line 2066  rplinit(int argc, char *argv[], char *en Line 2400  rplinit(int argc, char *argv[], char *en
 #                                   endif  #                                   endif
   
                                     liberation_contexte_cas(s_etat_processus);                                      liberation_contexte_cas(s_etat_processus);
                                     liberation_queue_signaux(s_etat_processus);                                      destruction_queue_signaux(s_etat_processus);
   
 #                                   ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                                   ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                     stackoverflow_deinstall_handler();                                      stackoverflow_deinstall_handler();
Line 2120  rplinit(int argc, char *argv[], char *en Line 2454  rplinit(int argc, char *argv[], char *en
 #                                   endif  #                                   endif
   
                                     liberation_contexte_cas(s_etat_processus);                                      liberation_contexte_cas(s_etat_processus);
                                     liberation_queue_signaux(s_etat_processus);                                      destruction_queue_signaux(s_etat_processus);
   
 #                                   ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                                   ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                     stackoverflow_deinstall_handler();                                      stackoverflow_deinstall_handler();
Line 2164  rplinit(int argc, char *argv[], char *en Line 2498  rplinit(int argc, char *argv[], char *en
 #                               endif  #                               endif
   
                                 liberation_contexte_cas(s_etat_processus);                                  liberation_contexte_cas(s_etat_processus);
                                 liberation_queue_signaux(s_etat_processus);                                  destruction_queue_signaux(s_etat_processus);
   
 #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                 stackoverflow_deinstall_handler();                                  stackoverflow_deinstall_handler();
Line 2228  rplinit(int argc, char *argv[], char *en Line 2562  rplinit(int argc, char *argv[], char *en
   
                                         liberation_contexte_cas(                                          liberation_contexte_cas(
                                                 s_etat_processus);                                                  s_etat_processus);
                                         liberation_queue_signaux(                                          destruction_queue_signaux(
                                                 s_etat_processus);                                                  s_etat_processus);
   
 #                                       ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                                       ifdef HAVE_STACK_OVERFLOW_RECOVERY
Line 2269  rplinit(int argc, char *argv[], char *en Line 2603  rplinit(int argc, char *argv[], char *en
 #                               endif  #                               endif
   
                                 liberation_contexte_cas(s_etat_processus);                                  liberation_contexte_cas(s_etat_processus);
                                 liberation_queue_signaux(s_etat_processus);                                  destruction_queue_signaux(s_etat_processus);
   
 #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                 stackoverflow_deinstall_handler();                                  stackoverflow_deinstall_handler();
Line 2308  rplinit(int argc, char *argv[], char *en Line 2642  rplinit(int argc, char *argv[], char *en
 #                               endif  #                               endif
   
                                 liberation_contexte_cas(s_etat_processus);                                  liberation_contexte_cas(s_etat_processus);
                                 liberation_queue_signaux(s_etat_processus);                                  destruction_queue_signaux(s_etat_processus);
   
 #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                 stackoverflow_deinstall_handler();                                  stackoverflow_deinstall_handler();
Line 2432  rplinit(int argc, char *argv[], char *en Line 2766  rplinit(int argc, char *argv[], char *en
 #               endif  #               endif
   
                 liberation_contexte_cas(s_etat_processus);                  liberation_contexte_cas(s_etat_processus);
                 liberation_queue_signaux(s_etat_processus);                  destruction_queue_signaux(s_etat_processus);
   
 #               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                     stackoverflow_deinstall_handler();                      stackoverflow_deinstall_handler();
Line 2470  rplinit(int argc, char *argv[], char *en Line 2804  rplinit(int argc, char *argv[], char *en
 #               endif  #               endif
   
                 liberation_contexte_cas(s_etat_processus);                  liberation_contexte_cas(s_etat_processus);
                 liberation_queue_signaux(s_etat_processus);                  destruction_queue_signaux(s_etat_processus);
   
 #               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                     stackoverflow_deinstall_handler();                      stackoverflow_deinstall_handler();
Line 2514  rplinit(int argc, char *argv[], char *en Line 2848  rplinit(int argc, char *argv[], char *en
 #               endif  #               endif
   
                 liberation_contexte_cas(s_etat_processus);                  liberation_contexte_cas(s_etat_processus);
                 liberation_queue_signaux(s_etat_processus);                  destruction_queue_signaux(s_etat_processus);
   
 #               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                     stackoverflow_deinstall_handler();                      stackoverflow_deinstall_handler();
Line 2553  rplinit(int argc, char *argv[], char *en Line 2887  rplinit(int argc, char *argv[], char *en
 #               endif  #               endif
   
                 liberation_contexte_cas(s_etat_processus);                  liberation_contexte_cas(s_etat_processus);
                 liberation_queue_signaux(s_etat_processus);                  destruction_queue_signaux(s_etat_processus);
   
 #               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                     stackoverflow_deinstall_handler();                      stackoverflow_deinstall_handler();
Line 2604  rplinit(int argc, char *argv[], char *en Line 2938  rplinit(int argc, char *argv[], char *en
 #               endif  #               endif
   
                 liberation_contexte_cas(s_etat_processus);                  liberation_contexte_cas(s_etat_processus);
                 liberation_queue_signaux(s_etat_processus);                  destruction_queue_signaux(s_etat_processus);
   
 #               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                     stackoverflow_deinstall_handler();                      stackoverflow_deinstall_handler();
Line 2653  rplinit(int argc, char *argv[], char *en Line 2987  rplinit(int argc, char *argv[], char *en
 #               endif  #               endif
   
                 liberation_contexte_cas(s_etat_processus);                  liberation_contexte_cas(s_etat_processus);
                 liberation_queue_signaux(s_etat_processus);                  destruction_queue_signaux(s_etat_processus);
   
 #               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                     stackoverflow_deinstall_handler();                      stackoverflow_deinstall_handler();
Line 2719  rplinit(int argc, char *argv[], char *en Line 3053  rplinit(int argc, char *argv[], char *en
 #               endif  #               endif
   
                 liberation_contexte_cas(s_etat_processus);                  liberation_contexte_cas(s_etat_processus);
                 liberation_queue_signaux(s_etat_processus);                  destruction_queue_signaux(s_etat_processus);
   
 #               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                     stackoverflow_deinstall_handler();                      stackoverflow_deinstall_handler();
Line 2758  rplinit(int argc, char *argv[], char *en Line 3092  rplinit(int argc, char *argv[], char *en
 #               endif  #               endif
   
                 liberation_contexte_cas(s_etat_processus);                  liberation_contexte_cas(s_etat_processus);
                 liberation_queue_signaux(s_etat_processus);                  destruction_queue_signaux(s_etat_processus);
   
 #               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                     stackoverflow_deinstall_handler();                      stackoverflow_deinstall_handler();
Line 2796  rplinit(int argc, char *argv[], char *en Line 3130  rplinit(int argc, char *argv[], char *en
 #               endif  #               endif
   
                 liberation_contexte_cas(s_etat_processus);                  liberation_contexte_cas(s_etat_processus);
                 liberation_queue_signaux(s_etat_processus);                  destruction_queue_signaux(s_etat_processus);
   
 #               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                     stackoverflow_deinstall_handler();                      stackoverflow_deinstall_handler();
Line 2835  rplinit(int argc, char *argv[], char *en Line 3169  rplinit(int argc, char *argv[], char *en
 #               endif  #               endif
   
                 liberation_contexte_cas(s_etat_processus);                  liberation_contexte_cas(s_etat_processus);
                 liberation_queue_signaux(s_etat_processus);                  destruction_queue_signaux(s_etat_processus);
   
 #               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                     stackoverflow_deinstall_handler();                      stackoverflow_deinstall_handler();
Line 2873  rplinit(int argc, char *argv[], char *en Line 3207  rplinit(int argc, char *argv[], char *en
 #               endif  #               endif
   
                 liberation_contexte_cas(s_etat_processus);                  liberation_contexte_cas(s_etat_processus);
                 liberation_queue_signaux(s_etat_processus);                  destruction_queue_signaux(s_etat_processus);
   
 #               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                     stackoverflow_deinstall_handler();                      stackoverflow_deinstall_handler();
Line 2933  rplinit(int argc, char *argv[], char *en Line 3267  rplinit(int argc, char *argv[], char *en
 #           endif  #           endif
   
             liberation_contexte_cas(s_etat_processus);              liberation_contexte_cas(s_etat_processus);
             liberation_queue_signaux(s_etat_processus);              destruction_queue_signaux(s_etat_processus);
   
 #           ifdef HAVE_STACK_OVERFLOW_RECOVERY  #           ifdef HAVE_STACK_OVERFLOW_RECOVERY
                 stackoverflow_deinstall_handler();                  stackoverflow_deinstall_handler();
Line 2988  rplinit(int argc, char *argv[], char *en Line 3322  rplinit(int argc, char *argv[], char *en
 #           endif  #           endif
   
             liberation_contexte_cas(s_etat_processus);              liberation_contexte_cas(s_etat_processus);
             liberation_queue_signaux(s_etat_processus);              destruction_queue_signaux(s_etat_processus);
   
 #           ifdef HAVE_STACK_OVERFLOW_RECOVERY  #           ifdef HAVE_STACK_OVERFLOW_RECOVERY
                 stackoverflow_deinstall_handler();                  stackoverflow_deinstall_handler();
Line 3250  rplinit(int argc, char *argv[], char *en Line 3584  rplinit(int argc, char *argv[], char *en
 #               endif  #               endif
   
                 liberation_contexte_cas(s_etat_processus);                  liberation_contexte_cas(s_etat_processus);
                 liberation_queue_signaux(s_etat_processus);                  destruction_queue_signaux(s_etat_processus);
   
 #               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                     stackoverflow_deinstall_handler();                      stackoverflow_deinstall_handler();
Line 3288  rplinit(int argc, char *argv[], char *en Line 3622  rplinit(int argc, char *argv[], char *en
 #               endif  #               endif
   
                 liberation_contexte_cas(s_etat_processus);                  liberation_contexte_cas(s_etat_processus);
                 liberation_queue_signaux(s_etat_processus);                  destruction_queue_signaux(s_etat_processus);
   
 #               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                     stackoverflow_deinstall_handler();                      stackoverflow_deinstall_handler();
Line 3340  rplinit(int argc, char *argv[], char *en Line 3674  rplinit(int argc, char *argv[], char *en
 #               endif  #               endif
   
                 liberation_contexte_cas(s_etat_processus);                  liberation_contexte_cas(s_etat_processus);
                 liberation_queue_signaux(s_etat_processus);                  destruction_queue_signaux(s_etat_processus);
   
 #               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                     stackoverflow_deinstall_handler();                      stackoverflow_deinstall_handler();
Line 3425  rplinit(int argc, char *argv[], char *en Line 3759  rplinit(int argc, char *argv[], char *en
 #                       endif  #                       endif
   
                         liberation_contexte_cas(s_etat_processus);                          liberation_contexte_cas(s_etat_processus);
                         liberation_queue_signaux(s_etat_processus);                          destruction_queue_signaux(s_etat_processus);
   
 #                       ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                       ifdef HAVE_STACK_OVERFLOW_RECOVERY
                             stackoverflow_deinstall_handler();                              stackoverflow_deinstall_handler();
Line 3472  rplinit(int argc, char *argv[], char *en Line 3806  rplinit(int argc, char *argv[], char *en
 #                       endif  #                       endif
   
                         liberation_contexte_cas(s_etat_processus);                          liberation_contexte_cas(s_etat_processus);
                         liberation_queue_signaux(s_etat_processus);                          destruction_queue_signaux(s_etat_processus);
   
 #                       ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                       ifdef HAVE_STACK_OVERFLOW_RECOVERY
                             stackoverflow_deinstall_handler();                              stackoverflow_deinstall_handler();
Line 3547  rplinit(int argc, char *argv[], char *en Line 3881  rplinit(int argc, char *argv[], char *en
 #                       endif  #                       endif
   
                         liberation_contexte_cas(s_etat_processus);                          liberation_contexte_cas(s_etat_processus);
                         liberation_queue_signaux(s_etat_processus);                          destruction_queue_signaux(s_etat_processus);
   
 #                       ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                       ifdef HAVE_STACK_OVERFLOW_RECOVERY
                             stackoverflow_deinstall_handler();                              stackoverflow_deinstall_handler();
Line 3598  rplinit(int argc, char *argv[], char *en Line 3932  rplinit(int argc, char *argv[], char *en
 #                       endif  #                       endif
   
                         liberation_contexte_cas(s_etat_processus);                          liberation_contexte_cas(s_etat_processus);
                         liberation_queue_signaux(s_etat_processus);                          destruction_queue_signaux(s_etat_processus);
   
 #                       ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                       ifdef HAVE_STACK_OVERFLOW_RECOVERY
                             stackoverflow_deinstall_handler();                              stackoverflow_deinstall_handler();
Line 3690  rplinit(int argc, char *argv[], char *en Line 4024  rplinit(int argc, char *argv[], char *en
 #                           endif  #                           endif
   
                             liberation_contexte_cas(s_etat_processus);                              liberation_contexte_cas(s_etat_processus);
                             liberation_queue_signaux(s_etat_processus);                              destruction_queue_signaux(s_etat_processus);
   
 #                           ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                           ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                 stackoverflow_deinstall_handler();                                  stackoverflow_deinstall_handler();
Line 3731  rplinit(int argc, char *argv[], char *en Line 4065  rplinit(int argc, char *argv[], char *en
                         }                          }
                     }                      }
   
                       /*
                        * Chargement des bibliothèques pour gérer des
                        * types externes lors des l'analyse syntaxique et
                        * compilation.
                        */
   
                       l_bibliotheque_courante = l_bibliotheques;
   
                       while(l_bibliotheque_courante != NULL)
                       {
                           if (empilement(s_etat_processus, &((*s_etat_processus)
                                   .l_base_pile), (*l_bibliotheque_courante)
                                   .donnee) == d_erreur)
                           {
   #                           ifndef SEMAPHORES_NOMMES
                                   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_FORK);
   #                           endif
   
                               liberation_contexte_cas(s_etat_processus);
                               destruction_queue_signaux(s_etat_processus);
   
   #                           ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                   stackoverflow_deinstall_handler();
   #                           endif
   
   #                           ifdef HAVE_SIGSEGV_RECOVERY
                                   if (debug == d_faux)
                                   {
                                       sigsegv_deinstall_handler();
                                   }
   #                           endif
   
                               if ((*s_etat_processus).langue == 'F')
                               {
                                   printf("+++Fatal :"
                                           " Chargement de la bibliothèse %s"
                                           " impossible\n", (unsigned char *)
                                           (*(*l_bibliotheque_courante).donnee)
                                           .objet);
                               }
                               else
                               {
                                   printf("+++Fatal : Cannot load library %s\n",
                                           (*(*l_bibliotheque_courante).donnee)
                                           .objet);
                               }
   
                               if (traitement_fichier_temporaire == 'Y')
                               {
                                   if (destruction_fichier(
                                           nom_fichier_temporaire)
                                           == d_erreur)
                                   {
                                       return(EXIT_FAILURE);
                                   }
   
                                   free(nom_fichier_temporaire);
                               }
   
                               return(EXIT_FAILURE);
                           }
   
                           instruction_use(s_etat_processus);
   
                           if (depilement(s_etat_processus, &((*s_etat_processus)
                                   .l_base_pile), &((*l_bibliotheque_courante)
                                   .donnee)) == d_erreur)
                           {
   #                           ifndef SEMAPHORES_NOMMES
                                   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_FORK);
   #                           endif
   
                               liberation_contexte_cas(s_etat_processus);
                               destruction_queue_signaux(s_etat_processus);
   
   #                           ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                   stackoverflow_deinstall_handler();
   #                           endif
   
   #                           ifdef HAVE_SIGSEGV_RECOVERY
                                   if (debug == d_faux)
                                   {
                                       sigsegv_deinstall_handler();
                                   }
   #                           endif
   
                               if ((*s_etat_processus).langue == 'F')
                               {
                                   printf("+++Fatal :"
                                           " Chargement de la bibliothèse %s"
                                           " impossible\n", (unsigned char *)
                                           (*(*l_bibliotheque_courante).donnee)
                                           .objet);
                               }
                               else
                               {
                                   printf("+++Fatal : Cannot load library %s\n",
                                           (*(*l_bibliotheque_courante).donnee)
                                           .objet);
                               }
   
                               if (traitement_fichier_temporaire == 'Y')
                               {
                                   if (destruction_fichier(
                                           nom_fichier_temporaire)
                                           == d_erreur)
                                   {
                                       return(EXIT_FAILURE);
                                   }
   
                                   free(nom_fichier_temporaire);
                               }
   
                               return(EXIT_FAILURE);
                           }
   
                           l_bibliotheque_courante =
                                   (*l_bibliotheque_courante).suivant;
                       }
   
                     if ((erreur = compilation(s_etat_processus)) !=                      if ((erreur = compilation(s_etat_processus)) !=
                             d_absence_erreur)                              d_absence_erreur)
                     {                      {
Line 3744  rplinit(int argc, char *argv[], char *en Line 4210  rplinit(int argc, char *argv[], char *en
 #                       endif  #                       endif
   
                         liberation_contexte_cas(s_etat_processus);                          liberation_contexte_cas(s_etat_processus);
                         liberation_queue_signaux(s_etat_processus);                          destruction_queue_signaux(s_etat_processus);
   
 #                       ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                       ifdef HAVE_STACK_OVERFLOW_RECOVERY
                             stackoverflow_deinstall_handler();                              stackoverflow_deinstall_handler();
Line 3826  rplinit(int argc, char *argv[], char *en Line 4292  rplinit(int argc, char *argv[], char *en
 #                       endif  #                       endif
   
                         liberation_contexte_cas(s_etat_processus);                          liberation_contexte_cas(s_etat_processus);
                         liberation_queue_signaux(s_etat_processus);                          destruction_queue_signaux(s_etat_processus);
   
 #                       ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                       ifdef HAVE_STACK_OVERFLOW_RECOVERY
                             stackoverflow_deinstall_handler();                              stackoverflow_deinstall_handler();
Line 3869  rplinit(int argc, char *argv[], char *en Line 4335  rplinit(int argc, char *argv[], char *en
 #                       endif  #                       endif
   
                         liberation_contexte_cas(s_etat_processus);                          liberation_contexte_cas(s_etat_processus);
                         liberation_queue_signaux(s_etat_processus);                          destruction_queue_signaux(s_etat_processus);
   
 #                       ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                       ifdef HAVE_STACK_OVERFLOW_RECOVERY
                             stackoverflow_deinstall_handler();                              stackoverflow_deinstall_handler();
Line 3913  rplinit(int argc, char *argv[], char *en Line 4379  rplinit(int argc, char *argv[], char *en
 #                       endif  #                       endif
   
                         liberation_contexte_cas(s_etat_processus);                          liberation_contexte_cas(s_etat_processus);
                         liberation_queue_signaux(s_etat_processus);                          destruction_queue_signaux(s_etat_processus);
   
 #                       ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                       ifdef HAVE_STACK_OVERFLOW_RECOVERY
                             stackoverflow_deinstall_handler();                              stackoverflow_deinstall_handler();
Line 3956  rplinit(int argc, char *argv[], char *en Line 4422  rplinit(int argc, char *argv[], char *en
 #                       endif  #                       endif
   
                         liberation_contexte_cas(s_etat_processus);                          liberation_contexte_cas(s_etat_processus);
                         liberation_queue_signaux(s_etat_processus);                          destruction_queue_signaux(s_etat_processus);
   
 #                       ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                       ifdef HAVE_STACK_OVERFLOW_RECOVERY
                             stackoverflow_deinstall_handler();                              stackoverflow_deinstall_handler();
Line 4004  rplinit(int argc, char *argv[], char *en Line 4470  rplinit(int argc, char *argv[], char *en
 #                       endif  #                       endif
   
                         liberation_contexte_cas(s_etat_processus);                          liberation_contexte_cas(s_etat_processus);
                         liberation_queue_signaux(s_etat_processus);                          destruction_queue_signaux(s_etat_processus);
   
 #                       ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                       ifdef HAVE_STACK_OVERFLOW_RECOVERY
                             stackoverflow_deinstall_handler();                              stackoverflow_deinstall_handler();
Line 4070  rplinit(int argc, char *argv[], char *en Line 4536  rplinit(int argc, char *argv[], char *en
 #                               endif  #                               endif
   
                                 liberation_contexte_cas(s_etat_processus);                                  liberation_contexte_cas(s_etat_processus);
                                 liberation_queue_signaux(s_etat_processus);                                  destruction_queue_signaux(s_etat_processus);
   
 #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                     stackoverflow_deinstall_handler();                                      stackoverflow_deinstall_handler();
Line 4133  rplinit(int argc, char *argv[], char *en Line 4599  rplinit(int argc, char *argv[], char *en
 #                               endif  #                               endif
   
                                 liberation_contexte_cas(s_etat_processus);                                  liberation_contexte_cas(s_etat_processus);
                                 liberation_queue_signaux(s_etat_processus);                                  destruction_queue_signaux(s_etat_processus);
   
 #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                     stackoverflow_deinstall_handler();                                      stackoverflow_deinstall_handler();
Line 4177  rplinit(int argc, char *argv[], char *en Line 4643  rplinit(int argc, char *argv[], char *en
 #                               endif  #                               endif
   
                                 liberation_contexte_cas(s_etat_processus);                                  liberation_contexte_cas(s_etat_processus);
                                 liberation_queue_signaux(s_etat_processus);                                  destruction_queue_signaux(s_etat_processus);
   
 #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                     stackoverflow_deinstall_handler();                                      stackoverflow_deinstall_handler();
Line 4209  rplinit(int argc, char *argv[], char *en Line 4675  rplinit(int argc, char *argv[], char *en
                         (*s_etat_processus).definitions_chainees = tampon;                          (*s_etat_processus).definitions_chainees = tampon;
                         (*s_etat_processus).position_courante = 0;                          (*s_etat_processus).position_courante = 0;
   
                           (*s_etat_processus).type_en_cours = NON;
                         recherche_type(s_etat_processus);                          recherche_type(s_etat_processus);
   
                         if ((*s_etat_processus).erreur_systeme != d_es)                          if ((*s_etat_processus).erreur_systeme != d_es)
Line 4224  rplinit(int argc, char *argv[], char *en Line 4691  rplinit(int argc, char *argv[], char *en
 #                           endif  #                           endif
   
                             liberation_contexte_cas(s_etat_processus);                              liberation_contexte_cas(s_etat_processus);
                             liberation_queue_signaux(s_etat_processus);                              destruction_queue_signaux(s_etat_processus);
   
 #                           ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                           ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                 stackoverflow_deinstall_handler();                                  stackoverflow_deinstall_handler();
Line 4281  rplinit(int argc, char *argv[], char *en Line 4748  rplinit(int argc, char *argv[], char *en
 #                               endif  #                               endif
   
                                 liberation_contexte_cas(s_etat_processus);                                  liberation_contexte_cas(s_etat_processus);
                                 liberation_queue_signaux(s_etat_processus);                                  destruction_queue_signaux(s_etat_processus);
   
 #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                     stackoverflow_deinstall_handler();                                      stackoverflow_deinstall_handler();
Line 4324  rplinit(int argc, char *argv[], char *en Line 4791  rplinit(int argc, char *argv[], char *en
 #                           endif  #                           endif
   
                             liberation_contexte_cas(s_etat_processus);                              liberation_contexte_cas(s_etat_processus);
                             liberation_queue_signaux(s_etat_processus);                              destruction_queue_signaux(s_etat_processus);
   
 #                           ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                           ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                 stackoverflow_deinstall_handler();                                  stackoverflow_deinstall_handler();
Line 4361  rplinit(int argc, char *argv[], char *en Line 4828  rplinit(int argc, char *argv[], char *en
 #                               endif  #                               endif
   
                                 liberation_contexte_cas(s_etat_processus);                                  liberation_contexte_cas(s_etat_processus);
                                 liberation_queue_signaux(s_etat_processus);                                  destruction_queue_signaux(s_etat_processus);
   
 #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                     stackoverflow_deinstall_handler();                                      stackoverflow_deinstall_handler();
Line 4405  rplinit(int argc, char *argv[], char *en Line 4872  rplinit(int argc, char *argv[], char *en
 #                           endif  #                           endif
   
                             liberation_contexte_cas(s_etat_processus);                              liberation_contexte_cas(s_etat_processus);
                             liberation_queue_signaux(s_etat_processus);                              destruction_queue_signaux(s_etat_processus);
   
 #                           ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                           ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                 stackoverflow_deinstall_handler();                                  stackoverflow_deinstall_handler();
Line 4445  rplinit(int argc, char *argv[], char *en Line 4912  rplinit(int argc, char *argv[], char *en
 #                                   endif  #                                   endif
   
                                     liberation_contexte_cas(s_etat_processus);                                      liberation_contexte_cas(s_etat_processus);
                                     liberation_queue_signaux(s_etat_processus);                                      destruction_queue_signaux(s_etat_processus);
   
 #                                   ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                                   ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                         stackoverflow_deinstall_handler();                                          stackoverflow_deinstall_handler();
Line 4492  rplinit(int argc, char *argv[], char *en Line 4959  rplinit(int argc, char *argv[], char *en
 #                               endif  #                               endif
   
                                 liberation_contexte_cas(s_etat_processus);                                  liberation_contexte_cas(s_etat_processus);
                                 liberation_queue_signaux(s_etat_processus);                                  destruction_queue_signaux(s_etat_processus);
   
 #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                     stackoverflow_deinstall_handler();                                      stackoverflow_deinstall_handler();
Line 4529  rplinit(int argc, char *argv[], char *en Line 4996  rplinit(int argc, char *argv[], char *en
 #                                   endif  #                                   endif
   
                                     liberation_contexte_cas(s_etat_processus);                                      liberation_contexte_cas(s_etat_processus);
                                     liberation_queue_signaux(s_etat_processus);                                      destruction_queue_signaux(s_etat_processus);
   
 #                                   ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                                   ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                         stackoverflow_deinstall_handler();                                          stackoverflow_deinstall_handler();
Line 4576  rplinit(int argc, char *argv[], char *en Line 5043  rplinit(int argc, char *argv[], char *en
 #                               endif  #                               endif
   
                                 liberation_contexte_cas(s_etat_processus);                                  liberation_contexte_cas(s_etat_processus);
                                 liberation_queue_signaux(s_etat_processus);                                  destruction_queue_signaux(s_etat_processus);
   
 #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                               ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                     stackoverflow_deinstall_handler();                                      stackoverflow_deinstall_handler();
Line 4716  rplinit(int argc, char *argv[], char *en Line 5183  rplinit(int argc, char *argv[], char *en
                         {                          {
                             if (setjmp(contexte_initial) == 0)                              if (setjmp(contexte_initial) == 0)
                             {                              {
                                 erreur = sequenceur_optimise(s_etat_processus);                                  erreur = sequenceur_optimise(s_etat_processus,
                                           l_bibliotheques);
   
                                 if (erreur == d_absence_erreur)                                  if (erreur == d_absence_erreur)
                                 {                                  {
Line 4927  rplinit(int argc, char *argv[], char *en Line 5395  rplinit(int argc, char *argv[], char *en
                                         (*(*((struct_processus_fils *)                                          (*(*((struct_processus_fils *)
                                         (*(*((struct_liste_chainee *)                                          (*(*((struct_liste_chainee *)
                                         l_element_courant)).donnee).objet))                                          l_element_courant)).donnee).objet))
                                         .thread).pid, rpl_sigurg);                                          .thread).pid, rpl_sigurg, d_faux);
                             }                              }
                             else                              else
                             {                              {
Line 4938  rplinit(int argc, char *argv[], char *en Line 5406  rplinit(int argc, char *argv[], char *en
                                             (*(*((struct_processus_fils *)                                              (*(*((struct_processus_fils *)
                                             (*(*((struct_liste_chainee *)                                              (*(*((struct_liste_chainee *)
                                             l_element_courant)).donnee).objet))                                              l_element_courant)).donnee).objet))
                                             .thread).pid, rpl_sigabort);                                              .thread).pid, rpl_sigabort, d_faux);
                                 }                                  }
                                 else                                  else
                                 {                                  {
Line 4946  rplinit(int argc, char *argv[], char *en Line 5414  rplinit(int argc, char *argv[], char *en
                                             (*(*((struct_processus_fils *)                                              (*(*((struct_processus_fils *)
                                             (*(*((struct_liste_chainee *)                                              (*(*((struct_liste_chainee *)
                                             l_element_courant)).donnee).objet))                                              l_element_courant)).donnee).objet))
                                             .thread).pid, rpl_sigstop);                                              .thread).pid, rpl_sigstop, d_faux);
                                 }                                  }
                             }                              }
                         }                          }
Line 4965  rplinit(int argc, char *argv[], char *en Line 5433  rplinit(int argc, char *argv[], char *en
                                 if ((*s_etat_processus).var_volatile_alarme                                  if ((*s_etat_processus).var_volatile_alarme
                                         != 0)                                          != 0)
                                 {                                  {
                                     envoi_signal_thread(                                      envoi_signal_thread(s_etat_processus,
                                             (*(*((struct_processus_fils *)                                              (*(*((struct_processus_fils *)
                                             (*(*((struct_liste_chainee *)                                              (*(*((struct_liste_chainee *)
                                             l_element_courant)).donnee).objet))                                              l_element_courant)).donnee).objet))
Line 4976  rplinit(int argc, char *argv[], char *en Line 5444  rplinit(int argc, char *argv[], char *en
                                     if ((*s_etat_processus).arret_depuis_abort                                      if ((*s_etat_processus).arret_depuis_abort
                                             == -1)                                              == -1)
                                     {                                      {
                                         envoi_signal_thread(                                          envoi_signal_thread(s_etat_processus,
                                                 (*(*((struct_processus_fils *)                                                  (*(*((struct_processus_fils *)
                                                 (*(*((struct_liste_chainee *)                                                  (*(*((struct_liste_chainee *)
                                                 l_element_courant)).donnee)                                                  l_element_courant)).donnee)
Line 4985  rplinit(int argc, char *argv[], char *en Line 5453  rplinit(int argc, char *argv[], char *en
                                     }                                      }
                                     else                                      else
                                     {                                      {
                                         envoi_signal_thread(                                          envoi_signal_thread(s_etat_processus,
                                                 (*(*((struct_processus_fils *)                                                  (*(*((struct_processus_fils *)
                                                 (*(*((struct_liste_chainee *)                                                  (*(*((struct_liste_chainee *)
                                                 l_element_courant)).donnee)                                                  l_element_courant)).donnee)
Line 5061  rplinit(int argc, char *argv[], char *en Line 5529  rplinit(int argc, char *argv[], char *en
 #                                   endif  #                                   endif
   
                                     liberation_contexte_cas(s_etat_processus);                                      liberation_contexte_cas(s_etat_processus);
                                     liberation_queue_signaux(s_etat_processus);                                      destruction_queue_signaux(s_etat_processus);
   
 #                                   ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                                   ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                         stackoverflow_deinstall_handler();                                          stackoverflow_deinstall_handler();
Line 5112  rplinit(int argc, char *argv[], char *en Line 5580  rplinit(int argc, char *argv[], char *en
 #                                   endif  #                                   endif
   
                                     liberation_contexte_cas(s_etat_processus);                                      liberation_contexte_cas(s_etat_processus);
                                     liberation_queue_signaux(s_etat_processus);                                      destruction_queue_signaux(s_etat_processus);
   
 #                                   ifdef HAVE_STACK_OVERFLOW_RECOVERY  #                                   ifdef HAVE_STACK_OVERFLOW_RECOVERY
                                         stackoverflow_deinstall_handler();                                          stackoverflow_deinstall_handler();
Line 5343  rplinit(int argc, char *argv[], char *en Line 5811  rplinit(int argc, char *argv[], char *en
                     {                      {
                         if ((*resultats) != NULL)                          if ((*resultats) != NULL)
                         {                          {
                             free((*resultats));                              sys_free((*resultats));
   
                             if (((*resultats) = malloc(((size_t)                              if (((*resultats) = sys_malloc(((size_t)
                                     ((*s_etat_processus)                                      ((*s_etat_processus)
                                     .hauteur_pile_operationnelle + 1))                                      .hauteur_pile_operationnelle + 1))
                                     * sizeof(unsigned char **))) != NULL)                                      * sizeof(unsigned char **))) != NULL)
Line 5432  rplinit(int argc, char *argv[], char *en Line 5900  rplinit(int argc, char *argv[], char *en
                         l_element_courant = l_element_suivant;                          l_element_courant = l_element_suivant;
                     }                      }
   
                     for(i = 0; i < (*s_etat_processus)  
                             .nombre_instructions_externes; i++)  
                     {  
                         free((*s_etat_processus).s_instructions_externes[i]  
                                 .nom);  
                         free((*s_etat_processus).s_instructions_externes[i]  
                                 .nom_bibliotheque);  
                     }  
   
                     if ((*s_etat_processus).nombre_instructions_externes != 0)  
                     {  
                         free((*s_etat_processus).s_instructions_externes);  
                     }  
   
                     l_element_courant = (void *) (*s_etat_processus)  
                             .s_bibliotheques;  
                       
                     while(l_element_courant != NULL)  
                     {  
                         l_element_suivant = (*((struct_liste_chainee *)  
                                 l_element_courant)).suivant;  
   
                         free((*((struct_bibliotheque *)  
                                 (*((struct_liste_chainee *)  
                                 l_element_courant)).donnee)).nom);  
                         dlclose((*((struct_bibliotheque *)  
                                 (*((struct_liste_chainee *)  
                                 l_element_courant)).donnee)).descripteur);  
                         free((*((struct_liste_chainee *) l_element_courant))  
                                 .donnee);  
                         free(l_element_courant);  
   
                         l_element_courant = l_element_suivant;  
                     }  
   
                     l_element_courant = (void *) (*s_etat_processus)                      l_element_courant = (void *) (*s_etat_processus)
                             .l_base_pile_last;                              .l_base_pile_last;
                     while(l_element_courant != NULL)                      while(l_element_courant != NULL)
Line 5482  rplinit(int argc, char *argv[], char *en Line 5915  rplinit(int argc, char *argv[], char *en
                         l_element_courant = l_element_suivant;                          l_element_courant = l_element_suivant;
                     }                      }
   
                       while((*s_etat_processus).s_bibliotheques != NULL)
                       {
                           retrait_bibliotheque(s_etat_processus,
                                   (struct_bibliotheque *)
                                   (*((struct_liste_chainee *)
                                   (*s_etat_processus).s_bibliotheques)).donnee);
                       }
   
                     l_element_courant = (void *) (*s_etat_processus)                      l_element_courant = (void *) (*s_etat_processus)
                             .l_base_pile_systeme;                              .l_base_pile_systeme;
                     while(l_element_courant != NULL)                      while(l_element_courant != NULL)
Line 5666  rplinit(int argc, char *argv[], char *en Line 6107  rplinit(int argc, char *argv[], char *en
   
     retrait_thread(s_etat_processus);      retrait_thread(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);
       }
   
       attente.tv_sec = 0;
       attente.tv_nsec = GRANULARITE_us * 1000;
   
       while(pthread_mutex_trylock(&((*s_etat_processus).mutex_pile_processus))
               == EBUSY)
       {
           nanosleep(&attente, NULL);
           INCR_GRANULARITE(attente.tv_nsec);
       }
   
       pthread_mutex_unlock(&((*s_etat_processus).mutex_pile_processus));
     pthread_mutex_destroy(&((*s_etat_processus).mutex_pile_processus));      pthread_mutex_destroy(&((*s_etat_processus).mutex_pile_processus));
     pthread_mutex_destroy(&((*s_etat_processus).mutex_allocation));      pthread_mutex_destroy(&((*s_etat_processus).mutex_allocation));
     pthread_mutex_destroy(&((*s_etat_processus).mutex_interruptions));      pthread_mutex_destroy(&((*s_etat_processus).mutex_interruptions));
     pthread_mutex_destroy(&((*s_etat_processus).mutex_signaux));  
     pthread_mutex_destroy(&mutex_sections_critiques);      pthread_mutex_destroy(&mutex_sections_critiques);
     pthread_mutex_destroy(&mutex_liste_variables_partagees);      pthread_mutex_destroy(&mutex_liste_variables_partagees);
   
       free((*s_etat_processus).localisation);
   
       destruction_queue_signaux(s_etat_processus);
       pthread_mutex_destroy(&((*s_etat_processus).mutex_signaux));
       liberation_contexte_cas(s_etat_processus);
   
 #   ifndef SEMAPHORES_NOMMES  #   ifndef SEMAPHORES_NOMMES
     sem_post(&((*s_etat_processus).semaphore_fork));      sem_post(&((*s_etat_processus).semaphore_fork));
     sem_destroy(&((*s_etat_processus).semaphore_fork));      sem_destroy(&((*s_etat_processus).semaphore_fork));
Line 5682  rplinit(int argc, char *argv[], char *en Line 6148  rplinit(int argc, char *argv[], char *en
             SEM_FORK);              SEM_FORK);
 #   endif  #   endif
   
     free((*s_etat_processus).localisation);  
   
     destruction_queue_signaux(s_etat_processus);  
     liberation_contexte_cas(s_etat_processus);  
   
     free((*s_etat_processus).chemin_fichiers_temporaires);      free((*s_etat_processus).chemin_fichiers_temporaires);
   
     if ((*s_etat_processus).requete_redemarrage == d_vrai)      if ((*s_etat_processus).requete_redemarrage == d_vrai)
Line 5699  rplinit(int argc, char *argv[], char *en Line 6160  rplinit(int argc, char *argv[], char *en
         erreur = d_erreur;          erreur = d_erreur;
     }      }
   
     free(arg_exec);      liberation_etat_processus_readline();
     arret_thread_signaux(s_etat_processus);  
     free(s_etat_processus);      liberation_allocateur_buffer(s_etat_processus);
       pthread_mutex_destroy(&((*s_etat_processus).mutex_allocation_buffer));
       pthread_mutex_destroy(&mutex_liste_threads);
   
       sys_free(s_etat_processus);
       sys_free(arg_exec);
   
 #   ifdef DEBUG_MEMOIRE  #   ifdef DEBUG_MEMOIRE
     debug_memoire_verification();      debug_memoire_verification();
Line 5740  informations(struct_processus *s_etat_pr Line 6206  informations(struct_processus *s_etat_pr
         printf("      -i : fonctionnement interactif\n");          printf("      -i : fonctionnement interactif\n");
         printf("      -l : licence d'utilisation\n");          printf("      -l : licence d'utilisation\n");
         printf("      -n : ignorance du signal HUP\n");          printf("      -n : ignorance du signal HUP\n");
           printf("      -m : chargement d'un module RPL/SO avant la "
                   "compilation\n");
         printf("      -p : précompilation du script avant exécution\n");          printf("      -p : précompilation du script avant exécution\n");
         printf("      -P : profilage (-P ou -PP)\n");          printf("      -P : profilage (-P ou -PP)\n");
         printf("      -s : empêchement de l'ouverture de l'écran initial\n");          printf("      -s : empêchement de l'ouverture de l'écran initial\n");
Line 5761  informations(struct_processus *s_etat_pr Line 6229  informations(struct_processus *s_etat_pr
         printf("      -i : runs the RPL/2 sequencer in interactive mode\n");          printf("      -i : runs the RPL/2 sequencer in interactive mode\n");
         printf("      -l : prints the user licence of the software\n");          printf("      -l : prints the user licence of the software\n");
         printf("      -n : ignores HUP signal\n");          printf("      -n : ignores HUP signal\n");
           printf("      -m : loads RPL/SO object before compilation\n");
         printf("      -p : precompiles script\n");          printf("      -p : precompiles script\n");
         printf("      -P : computes profile data (-P or -PP)\n");          printf("      -P : computes profile data (-P or -PP)\n");
         printf("      -s : disables splash screen\n");          printf("      -s : disables splash screen\n");
Line 5827  controle_integrite(struct_processus *s_e Line 6296  controle_integrite(struct_processus *s_e
   
   
 unsigned char *  unsigned char *
 date_compilation()  date_compilation(struct_processus *s_etat_processus)
 {  {
     unsigned char       *date;      unsigned char       *date;
   

Removed from v.1.159  
changed lines
  Added in v.1.208


CVSweb interface <joel.bertrand@systella.fr>