--- rpl/src/instructions_s10.c 2010/04/17 18:57:36 1.7 +++ rpl/src/instructions_s10.c 2010/06/19 15:54:51 1.15 @@ -1,6 +1,6 @@ /* ================================================================================ - RPL/2 (R) version 4.0.14 + RPL/2 (R) version 4.0.16 Copyright (C) 1989-2010 Dr. BERTRAND Joël This file is part of RPL/2. @@ -111,8 +111,7 @@ instruction_spawn(struct_processus *s_et * d'une fonction ou d'une expression RPN. */ - if (((*s_objet).type != NOM) && - ((*s_objet).type != RPN)) + if (((*s_objet).type != NOM) && ((*s_objet).type != RPN)) { liberation(s_etat_processus, s_objet); @@ -266,6 +265,12 @@ instruction_spawn(struct_processus *s_et return; } + if (sigaddset(&set, SIGFABORT) != 0) + { + (*s_etat_processus).erreur_systeme = d_es_processus; + return; + } + if (sigaddset(&set, SIGURG) != 0) { (*s_etat_processus).erreur_systeme = d_es_processus; @@ -454,6 +459,7 @@ instruction_spawn(struct_processus *s_et (*s_argument_thread).set = set; (*s_argument_thread).oldset = oldset; + (*s_argument_thread).thread_actif = d_faux; if (pthread_create(&thread_id, &attributs, lancement_thread, s_argument_thread) != 0) @@ -462,6 +468,15 @@ instruction_spawn(struct_processus *s_et return; } + attente.tv_sec = 0; + attente.tv_nsec = GRANULARITE_us * 1000; + + while((*s_argument_thread).thread_actif == d_faux) + { + nanosleep(&attente, NULL); + INCR_GRANULARITE(attente.tv_nsec); + } + if (pthread_attr_destroy(&attributs) != 0) { (*s_etat_processus).erreur_systeme = d_es_processus; @@ -795,7 +810,7 @@ instruction_sqlconnect(struct_processus /* ================================================================================ - Fonction 'sqlconnect' + Fonction 'sqldisconnect' ================================================================================ Entrées : --------------------------------------------------------------------------------