--- rpl/src/interruptions.c 2011/10/05 13:14:19 1.83 +++ rpl/src/interruptions.c 2012/01/05 10:19:05 1.90 @@ -1,7 +1,7 @@ /* ================================================================================ - RPL/2 (R) version 4.1.4 - Copyright (C) 1989-2011 Dr. BERTRAND Joël + RPL/2 (R) version 4.1.5 + Copyright (C) 1989-2012 Dr. BERTRAND Joël This file is part of RPL/2. @@ -1772,7 +1772,6 @@ interruption3(int signal) kill(pid_processus_pere, SIGUSR1); } - if (signal != SIGUSR2) { write(STDERR_FILENO, message_1, strlen(message_1)); @@ -1828,7 +1827,7 @@ interruption_violation_access(void *adre unsigned char message[] = "+++System : Trying to catch access " "violation\n"; - static int compteur_erreur = 0; + static int compteur_erreur = 0; if ((gravite == 0) && (routine_recursive != 0)) { @@ -1935,13 +1934,6 @@ signal_stop(struct_processus *s_etat_pro if (pid == getpid()) { - if ((s_etat_processus = recherche_thread(getpid(), pthread_self())) - == NULL) - { - deverrouillage_gestionnaire_signaux(s_etat_processus); - return; - } - if (((*s_etat_processus).type_debug & d_debug_signaux) != 0) { printf("[%d] RPL/SIGSTOP (thread %llu)\n", (int) getpid(), @@ -2033,13 +2025,6 @@ signal_urg(struct_processus *s_etat_proc if (pid == getpid()) { - if ((s_etat_processus = recherche_thread(getpid(), pthread_self())) - == NULL) - { - deverrouillage_gestionnaire_signaux(s_etat_processus); - return; - } - if (((*s_etat_processus).type_debug & d_debug_signaux) != 0) { printf("[%d] RPL/SIGURG (thread %llu)\n", (int) getpid(), @@ -2089,13 +2074,6 @@ signal_abort(struct_processus *s_etat_pr if (pid == getpid()) { - if ((s_etat_processus = recherche_thread(getpid(), pthread_self())) - == NULL) - { - deverrouillage_gestionnaire_signaux(s_etat_processus); - return; - } - (*s_etat_processus).arret_depuis_abort = -1; /* @@ -2362,6 +2340,7 @@ nom_segment(unsigned char *chemin, pid_t # ifdef IPCS_SYSV // !POSIX # ifndef OS2 // !OS2 + if ((fichier = malloc((strlen(chemin) + 1 + 256 + 1) * sizeof(unsigned char))) == NULL) { @@ -2620,6 +2599,8 @@ envoi_signal_processus(pid_t pid, enum s # endif } + kill(pid, SIGALRM); + return(0); } @@ -2683,6 +2664,8 @@ envoi_signal_thread(pthread_t tid, enum return(1); } + pthread_kill(tid, SIGALRM); + return(0); } @@ -2699,6 +2682,8 @@ envoi_signal_contexte(struct_processus * % LONGUEUR_QUEUE_SIGNAUX; pthread_mutex_unlock(&mutex_interruptions); + pthread_kill((*s_etat_processus_a_signaler).tid, SIGALRM); + return(0); }