version 1.5, 2010/03/09 10:18:49
|
version 1.48, 2012/07/03 13:56:32
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.0.13 |
RPL/2 (R) version 4.1.9 |
Copyright (C) 1989-2010 Dr. BERTRAND Joël |
Copyright (C) 1989-2012 Dr. BERTRAND Joël |
|
|
This file is part of RPL/2. |
This file is part of RPL/2. |
|
|
Line 20
|
Line 20
|
*/ |
*/ |
|
|
|
|
#include "rpl.conv.h" |
#include "rpl-conv.h" |
|
|
|
|
/* |
/* |
Line 247 instruction_send(struct_processus *s_eta
|
Line 247 instruction_send(struct_processus *s_eta
|
attente.tv_sec = 0; |
attente.tv_sec = 0; |
attente.tv_nsec = GRANULARITE_us * 1000; |
attente.tv_nsec = GRANULARITE_us * 1000; |
|
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 257 instruction_send(struct_processus *s_eta
|
Line 261 instruction_send(struct_processus *s_eta
|
(*s_etat_processus).pipe_nombre_objets_attente, |
(*s_etat_processus).pipe_nombre_objets_attente, |
&pid, sizeof(pid))) != sizeof(pid)) |
&pid, sizeof(pid))) != sizeof(pid)) |
{ |
{ |
while(sem_wait(&((*s_etat_processus).semaphore_fork)) == -1) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
if (errno != EINTR) |
if (errno != EINTR) |
{ |
{ |
Line 280 instruction_send(struct_processus *s_eta
|
Line 288 instruction_send(struct_processus *s_eta
|
nanosleep(&attente, NULL); |
nanosleep(&attente, NULL); |
INCR_GRANULARITE(attente.tv_nsec); |
INCR_GRANULARITE(attente.tv_nsec); |
|
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
} |
} |
|
|
|
scrutation_interruptions(s_etat_processus); |
} |
} |
|
|
pid = getpid(); |
pid = getpid(); |
Line 296 instruction_send(struct_processus *s_eta
|
Line 310 instruction_send(struct_processus *s_eta
|
(*s_etat_processus).pipe_nombre_objets_attente, |
(*s_etat_processus).pipe_nombre_objets_attente, |
&pid, sizeof(pid))) != sizeof(pid)) |
&pid, sizeof(pid))) != sizeof(pid)) |
{ |
{ |
while(sem_wait(&((*s_etat_processus).semaphore_fork)) == -1) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
if (errno != EINTR) |
if (errno != EINTR) |
{ |
{ |
Line 319 instruction_send(struct_processus *s_eta
|
Line 337 instruction_send(struct_processus *s_eta
|
nanosleep(&attente, NULL); |
nanosleep(&attente, NULL); |
INCR_GRANULARITE(attente.tv_nsec); |
INCR_GRANULARITE(attente.tv_nsec); |
|
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
} |
} |
|
|
|
scrutation_interruptions(s_etat_processus); |
} |
} |
|
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) == -1) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
if (errno != EINTR) |
if (errno != EINTR) |
{ |
{ |
Line 347 instruction_send(struct_processus *s_eta
|
Line 375 instruction_send(struct_processus *s_eta
|
} |
} |
} |
} |
|
|
tid = -3; |
tid = (pthread_t) -3; |
|
|
attente.tv_sec = 0; |
attente.tv_sec = 0; |
attente.tv_nsec = GRANULARITE_us * 1000; |
attente.tv_nsec = GRANULARITE_us * 1000; |
|
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 362 instruction_send(struct_processus *s_eta
|
Line 394 instruction_send(struct_processus *s_eta
|
(*s_etat_processus).pipe_nombre_objets_attente, |
(*s_etat_processus).pipe_nombre_objets_attente, |
&tid, sizeof(tid))) != sizeof(tid)) |
&tid, sizeof(tid))) != sizeof(tid)) |
{ |
{ |
while(sem_wait(&((*s_etat_processus).semaphore_fork)) == -1) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
if (errno != EINTR) |
(*s_etat_processus).erreur_systeme = d_es_processus; |
{ |
return; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
} |
} |
|
|
if (longueur_ecriture == -1) |
if (longueur_ecriture == -1) |
Line 385 instruction_send(struct_processus *s_eta
|
Line 418 instruction_send(struct_processus *s_eta
|
nanosleep(&attente, NULL); |
nanosleep(&attente, NULL); |
INCR_GRANULARITE(attente.tv_nsec); |
INCR_GRANULARITE(attente.tv_nsec); |
|
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
} |
} |
|
|
|
scrutation_interruptions(s_etat_processus); |
} |
} |
|
|
tid = pthread_self(); |
tid = pthread_self(); |
Line 401 instruction_send(struct_processus *s_eta
|
Line 440 instruction_send(struct_processus *s_eta
|
(*s_etat_processus).pipe_nombre_objets_attente, |
(*s_etat_processus).pipe_nombre_objets_attente, |
&tid, sizeof(tid))) != sizeof(tid)) |
&tid, sizeof(tid))) != sizeof(tid)) |
{ |
{ |
while(sem_wait(&((*s_etat_processus).semaphore_fork)) == -1) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
if (errno != EINTR) |
if (errno != EINTR) |
{ |
{ |
Line 424 instruction_send(struct_processus *s_eta
|
Line 467 instruction_send(struct_processus *s_eta
|
nanosleep(&attente, NULL); |
nanosleep(&attente, NULL); |
INCR_GRANULARITE(attente.tv_nsec); |
INCR_GRANULARITE(attente.tv_nsec); |
|
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
} |
} |
|
|
|
scrutation_interruptions(s_etat_processus); |
} |
} |
|
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) == -1) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
if (errno != EINTR) |
(*s_etat_processus).erreur_systeme = d_es_processus; |
{ |
return; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
} |
} |
} |
} |
|
|
Line 446 instruction_send(struct_processus *s_eta
|
Line 496 instruction_send(struct_processus *s_eta
|
attente.tv_sec = 0; |
attente.tv_sec = 0; |
attente.tv_nsec = GRANULARITE_us * 1000; |
attente.tv_nsec = GRANULARITE_us * 1000; |
|
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 455 instruction_send(struct_processus *s_eta
|
Line 509 instruction_send(struct_processus *s_eta
|
while(read_atomic(s_etat_processus, (*s_etat_processus).pipe_acquittement, |
while(read_atomic(s_etat_processus, (*s_etat_processus).pipe_acquittement, |
&tampon, sizeof(unsigned char)) != sizeof(unsigned char)) |
&tampon, sizeof(unsigned char)) != sizeof(unsigned char)) |
{ |
{ |
while(sem_wait(&((*s_etat_processus).semaphore_fork)) == -1) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
if (errno != EINTR) |
if (errno != EINTR) |
{ |
{ |
Line 467 instruction_send(struct_processus *s_eta
|
Line 525 instruction_send(struct_processus *s_eta
|
nanosleep(&attente, NULL); |
nanosleep(&attente, NULL); |
INCR_GRANULARITE(attente.tv_nsec); |
INCR_GRANULARITE(attente.tv_nsec); |
|
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
} |
} |
|
|
|
scrutation_interruptions(s_etat_processus); |
} |
} |
|
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) == -1) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
if (errno != EINTR) |
if (errno != EINTR) |
{ |
{ |
Line 493 instruction_send(struct_processus *s_eta
|
Line 561 instruction_send(struct_processus *s_eta
|
attente.tv_sec = 0; |
attente.tv_sec = 0; |
attente.tv_nsec = GRANULARITE_us * 1000; |
attente.tv_nsec = GRANULARITE_us * 1000; |
|
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 503 instruction_send(struct_processus *s_eta
|
Line 575 instruction_send(struct_processus *s_eta
|
(*s_etat_processus).pipe_nombre_interruptions_attente, |
(*s_etat_processus).pipe_nombre_interruptions_attente, |
&pid, sizeof(pid))) != sizeof(pid)) |
&pid, sizeof(pid))) != sizeof(pid)) |
{ |
{ |
while(sem_wait(&((*s_etat_processus).semaphore_fork)) == -1) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
if (errno != EINTR) |
(*s_etat_processus).erreur_systeme = d_es_processus; |
{ |
return; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
} |
} |
|
|
if (longueur_ecriture == -1) |
if (longueur_ecriture == -1) |
Line 526 instruction_send(struct_processus *s_eta
|
Line 599 instruction_send(struct_processus *s_eta
|
nanosleep(&attente, NULL); |
nanosleep(&attente, NULL); |
INCR_GRANULARITE(attente.tv_nsec); |
INCR_GRANULARITE(attente.tv_nsec); |
|
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
} |
} |
} |
} |
|
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) == -1) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
if (errno != EINTR) |
if (errno != EINTR) |
{ |
{ |
Line 541 instruction_send(struct_processus *s_eta
|
Line 622 instruction_send(struct_processus *s_eta
|
return; |
return; |
} |
} |
} |
} |
|
|
|
scrutation_interruptions(s_etat_processus); |
} |
} |
else |
else |
{ |
{ |
tid = -1; |
tid = (pthread_t) -1; |
|
|
attente.tv_sec = 0; |
attente.tv_sec = 0; |
attente.tv_nsec = GRANULARITE_us * 1000; |
attente.tv_nsec = GRANULARITE_us * 1000; |
|
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 559 instruction_send(struct_processus *s_eta
|
Line 646 instruction_send(struct_processus *s_eta
|
(*s_etat_processus).pipe_nombre_interruptions_attente, |
(*s_etat_processus).pipe_nombre_interruptions_attente, |
&tid, sizeof(tid))) != sizeof(tid)) |
&tid, sizeof(tid))) != sizeof(tid)) |
{ |
{ |
while(sem_wait(&((*s_etat_processus).semaphore_fork)) == -1) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
if (errno != EINTR) |
if (errno != EINTR) |
{ |
{ |
Line 582 instruction_send(struct_processus *s_eta
|
Line 673 instruction_send(struct_processus *s_eta
|
nanosleep(&attente, NULL); |
nanosleep(&attente, NULL); |
INCR_GRANULARITE(attente.tv_nsec); |
INCR_GRANULARITE(attente.tv_nsec); |
|
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
} |
} |
|
|
|
scrutation_interruptions(s_etat_processus); |
} |
} |
|
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) == -1) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
if (errno != EINTR) |
if (errno != EINTR) |
{ |
{ |
Line 601 instruction_send(struct_processus *s_eta
|
Line 702 instruction_send(struct_processus *s_eta
|
|
|
// ecriture_pipe() ne peut être interrompu par un signal. |
// ecriture_pipe() ne peut être interrompu par un signal. |
|
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 610 instruction_send(struct_processus *s_eta
|
Line 715 instruction_send(struct_processus *s_eta
|
if (ecriture_pipe(s_etat_processus, (*s_etat_processus).pipe_donnees, |
if (ecriture_pipe(s_etat_processus, (*s_etat_processus).pipe_donnees, |
s_objet) == d_erreur) |
s_objet) == d_erreur) |
{ |
{ |
while(sem_wait(&((*s_etat_processus).semaphore_fork)) == -1) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
if (errno != EINTR) |
if (errno != EINTR) |
{ |
{ |
Line 628 instruction_send(struct_processus *s_eta
|
Line 737 instruction_send(struct_processus *s_eta
|
return; |
return; |
} |
} |
|
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) == -1) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
if (errno != EINTR) |
if (errno != EINTR) |
{ |
{ |
Line 674 instruction_sqlquery(struct_processus *s
|
Line 787 instruction_sqlquery(struct_processus *s
|
{ |
{ |
# define d_LONGUEUR 1024 |
# define d_LONGUEUR 1024 |
|
|
|
# if defined(MYSQL_SUPPORT) || defined(POSTGRESQL_SUPPORT) |
logical1 connexion_permanente; |
logical1 connexion_permanente; |
logical1 presence_resultat; |
# endif |
|
|
struct_objet *s_copie_1; |
struct_objet *s_copie_1; |
struct_objet *s_objet_1; |
struct_objet *s_objet_1; |
struct_objet *s_copie_2; |
struct_objet *s_copie_2; |
struct_objet *s_objet_2; |
struct_objet *s_objet_2; |
struct_objet *s_objet_resultat; |
|
|
|
struct_liste_chainee *l_element_courant; |
|
struct_liste_chainee *l_element_courant_ligne; |
|
|
|
unsigned char *tampon; |
unsigned char *tampon; |
|
|
unsigned int i; |
|
unsigned int j; |
|
unsigned int nombre_colonnes; |
|
unsigned int nombre_lignes; |
|
|
|
(*s_etat_processus).erreur_execution = d_ex; |
(*s_etat_processus).erreur_execution = d_ex; |
|
|
if ((*s_etat_processus).affichage_arguments == 'Y') |
if ((*s_etat_processus).affichage_arguments == 'Y') |
Line 767 instruction_sqlquery(struct_processus *s
|
Line 872 instruction_sqlquery(struct_processus *s
|
|
|
if ((*s_objet_1).type == LST) |
if ((*s_objet_1).type == LST) |
{ |
{ |
|
# if defined(MYSQL_SUPPORT) || defined(POSTGRESQL_SUPPORT) |
connexion_permanente = d_faux; |
connexion_permanente = d_faux; |
|
# endif |
|
|
s_copie_1 = s_objet_1; |
s_copie_1 = s_objet_1; |
|
|
Line 778 instruction_sqlquery(struct_processus *s
|
Line 885 instruction_sqlquery(struct_processus *s
|
return; |
return; |
} |
} |
|
|
|
if ((*s_etat_processus).erreur_execution == |
|
d_ex_instruction_indisponible) |
|
{ |
|
liberation(s_etat_processus, s_objet_1); |
|
liberation(s_etat_processus, s_objet_2); |
|
liberation(s_etat_processus, s_copie_1); |
|
|
|
return; |
|
} |
|
|
liberation(s_etat_processus, s_copie_1); |
liberation(s_etat_processus, s_copie_1); |
} |
} |
else |
else |
Line 797 instruction_sqlquery(struct_processus *s
|
Line 914 instruction_sqlquery(struct_processus *s
|
} |
} |
} |
} |
|
|
|
# if defined(MYSQL_SUPPORT) || defined(POSTGRESQL_SUPPORT) |
connexion_permanente = d_vrai; |
connexion_permanente = d_vrai; |
|
# endif |
} |
} |
|
|
if (((*s_objet_1).type == SQL) && ((*s_objet_2).type == CHN)) |
if (((*s_objet_1).type == SQL) && ((*s_objet_2).type == CHN)) |
Line 839 instruction_sqlquery(struct_processus *s
|
Line 958 instruction_sqlquery(struct_processus *s
|
{ |
{ |
# ifdef MYSQL_SUPPORT |
# ifdef MYSQL_SUPPORT |
|
|
MYSQL_RES *resultat_mysql; |
unsigned int i; |
MYSQL_ROW ligne; |
unsigned int nombre_colonnes; |
|
|
|
logical1 presence_resultat; |
|
|
|
MYSQL_RES *resultat_mysql; |
|
MYSQL_ROW ligne; |
|
|
|
struct_objet *s_objet_resultat; |
|
|
|
struct_liste_chainee *l_element_courant; |
|
struct_liste_chainee *l_element_courant_ligne; |
|
|
if (mysql_real_query((*((struct_connecteur_sql *) (*s_objet_1) |
if (mysql_real_query((*((struct_connecteur_sql *) (*s_objet_1) |
.objet)).descripteur.mysql, (unsigned char *) (*s_objet_2) |
.objet)).descripteur.mysql, (unsigned char *) (*s_objet_2) |
Line 1042 instruction_sqlquery(struct_processus *s
|
Line 1171 instruction_sqlquery(struct_processus *s
|
{ |
{ |
# ifdef POSTGRESQL_SUPPORT |
# ifdef POSTGRESQL_SUPPORT |
|
|
PGresult *resultat_postgresql; |
unsigned int i; |
|
unsigned int j; |
|
unsigned int nombre_colonnes; |
|
unsigned int nombre_lignes; |
|
|
|
logical1 presence_resultat; |
|
|
|
PGresult *resultat_postgresql; |
|
|
|
struct_objet *s_objet_resultat; |
|
|
|
struct_liste_chainee *l_element_courant; |
|
struct_liste_chainee *l_element_courant_ligne; |
|
|
if (PQstatus((*((struct_connecteur_sql *) (*s_objet_1).objet)) |
if (PQstatus((*((struct_connecteur_sql *) (*s_objet_1).objet)) |
.descripteur.postgresql) != CONNECTION_OK) |
.descripteur.postgresql) != CONNECTION_OK) |
Line 1330 instruction_stop(struct_processus *s_eta
|
Line 1471 instruction_stop(struct_processus *s_eta
|
|
|
struct_objet *s_objet; |
struct_objet *s_objet; |
|
|
struct timespec attente; |
|
|
|
attente.tv_sec = 0; |
|
attente.tv_nsec = GRANULARITE_us * 1000; |
|
|
|
(*s_etat_processus).erreur_execution = d_ex; |
(*s_etat_processus).erreur_execution = d_ex; |
|
|
if ((*s_etat_processus).affichage_arguments == 'Y') |
if ((*s_etat_processus).affichage_arguments == 'Y') |
Line 1380 instruction_stop(struct_processus *s_eta
|
Line 1516 instruction_stop(struct_processus *s_eta
|
if ((*(*((struct_processus_fils *) (*s_objet).objet)).thread) |
if ((*(*((struct_processus_fils *) (*s_objet).objet)).thread) |
.processus_detache == d_vrai) |
.processus_detache == d_vrai) |
{ |
{ |
kill((*(*((struct_processus_fils *) (*s_objet).objet)).thread).pid, |
envoi_signal_processus((*(*((struct_processus_fils *) |
SIGFSTOP); |
(*s_objet).objet)).thread).pid, rpl_sigstop); |
} |
} |
else |
else |
{ |
{ |
Line 1400 instruction_stop(struct_processus *s_eta
|
Line 1536 instruction_stop(struct_processus *s_eta
|
.donnee).objet)).thread).processus_detache == d_faux) |
.donnee).objet)).thread).processus_detache == d_faux) |
{ |
{ |
if ((pthread_equal((*(*((struct_processus_fils *) |
if ((pthread_equal((*(*((struct_processus_fils *) |
(*(*l_element_courant).donnee).objet)).thread).pid, |
(*(*l_element_courant).donnee).objet)).thread).tid, |
(*(*((struct_processus_fils *) |
(*(*((struct_processus_fils *) |
(*s_objet).objet)).thread).tid) != 0) && |
(*s_objet).objet)).thread).tid) != 0) && |
((*(*((struct_processus_fils *) |
((*(*((struct_processus_fils *) |
Line 1441 instruction_stop(struct_processus *s_eta
|
Line 1577 instruction_stop(struct_processus *s_eta
|
if ((*(*((struct_processus_fils *) |
if ((*(*((struct_processus_fils *) |
(*s_objet).objet)).thread).thread_actif == d_vrai) |
(*s_objet).objet)).thread).thread_actif == d_vrai) |
{ |
{ |
pthread_kill((*(*((struct_processus_fils *) |
envoi_signal_thread((*(*((struct_processus_fils *) |
(*s_objet).objet)).thread).tid, SIGFSTOP); |
(*s_objet).objet)).thread).tid, rpl_sigstop); |
} |
} |
|
|
if (pthread_mutex_unlock(&((*(*((struct_processus_fils *) |
if (pthread_mutex_unlock(&((*(*((struct_processus_fils *) |