--- rpl/src/instructions_s9.c 2011/08/09 11:31:35 1.36 +++ rpl/src/instructions_s9.c 2011/09/14 14:34:28 1.37 @@ -809,7 +809,7 @@ instruction_save(struct_processus *s_eta void instruction_suspend(struct_processus *s_etat_processus) { - sigset_t masque; + struct timespec attente; (*s_etat_processus).erreur_execution = d_ex; @@ -819,12 +819,12 @@ instruction_suspend(struct_processus *s_ if ((*s_etat_processus).langue == 'F') { - printf("(attend un signal SIGCONT)\n\n"); + printf("(attend un signal RPL/SIGCONT)\n\n"); printf(" Aucun argument\n"); } else { - printf("(wait for SIGCONT signal)\n\n"); + printf("(wait for RPL/SIGCONT signal)\n\n"); printf(" No argument\n"); } @@ -844,42 +844,6 @@ instruction_suspend(struct_processus *s_ } } - if (sigfillset(&masque) != 0) - { - (*s_etat_processus).erreur_systeme = d_es_processus; - return; - } - - if (sigdelset(&masque, SIGCONT) != 0) - { - (*s_etat_processus).erreur_systeme = d_es_processus; - return; - } - - if (sigdelset(&masque, SIGFSTOP) != 0) - { - (*s_etat_processus).erreur_systeme = d_es_processus; - return; - } - - if (sigdelset(&masque, SIGFABORT) != 0) - { - (*s_etat_processus).erreur_systeme = d_es_processus; - return; - } - - if (sigdelset(&masque, SIGURG) != 0) - { - (*s_etat_processus).erreur_systeme = d_es_processus; - return; - } - - if (sigdelset(&masque, SIGALRM) != 0) - { - (*s_etat_processus).erreur_systeme = d_es_processus; - return; - } - if ((*s_etat_processus).profilage == d_vrai) { profilage(s_etat_processus, "Suspend"); @@ -904,7 +868,18 @@ instruction_suspend(struct_processus *s_ } # endif - sigsuspend(&masque); + for((*s_etat_processus).redemarrage_processus = d_faux;;) + { + scrutation_interruptions(s_etat_processus); + + if ((*s_etat_processus).redemarrage_processus == d_vrai) + { + break; + } + + nanosleep(&attente, NULL); + INCR_GRANULARITE(attente.tv_nsec); + } # ifndef SEMAPHORES_NOMMES while(sem_wait(&((*s_etat_processus).semaphore_fork)) == -1)