version 1.3, 2010/02/10 10:14:25
|
version 1.12, 2010/07/14 14:19:39
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.0.11 |
RPL/2 (R) version 4.0.18 |
Copyright (C) 1989-2010 Dr. BERTRAND Joël |
Copyright (C) 1989-2010 Dr. BERTRAND Joël |
|
|
This file is part of RPL/2. |
This file is part of RPL/2. |
Line 782 instruction_use(struct_processus *s_etat
|
Line 782 instruction_use(struct_processus *s_etat
|
{ |
{ |
free(tampon); |
free(tampon); |
|
|
if ((tampon = malloc((strlen((unsigned char *) |
if ((*s_etat_processus).rpl_home == NULL) |
(*s_objet_argument).objet) + strlen(d_exec_path) + 7) |
|
* sizeof(unsigned char))) == NULL) |
|
{ |
{ |
(*s_etat_processus).erreur_systeme = |
if ((tampon = malloc((strlen((unsigned char *) |
d_es_allocation_memoire; |
(*s_objet_argument).objet) + strlen(d_exec_path) |
return; |
+ 7) * sizeof(unsigned char))) == NULL) |
|
{ |
|
(*s_etat_processus).erreur_systeme = |
|
d_es_allocation_memoire; |
|
return; |
|
} |
|
|
|
sprintf(tampon, "/%s/lib/%s", d_exec_path, (unsigned char *) |
|
(*s_objet_argument).objet); |
} |
} |
|
else |
|
{ |
|
if ((tampon = malloc((strlen((unsigned char *) |
|
(*s_objet_argument).objet) + |
|
strlen((*s_etat_processus).rpl_home) |
|
+ 7) * sizeof(unsigned char))) == NULL) |
|
{ |
|
(*s_etat_processus).erreur_systeme = |
|
d_es_allocation_memoire; |
|
return; |
|
} |
|
|
sprintf(tampon, "/%s/lib/%s", d_exec_path, (unsigned char *) |
sprintf(tampon, "/%s/lib/%s", (*s_etat_processus).rpl_home, |
(*s_objet_argument).objet); |
(unsigned char *) (*s_objet_argument).objet); |
|
} |
|
|
caracteristiques_fichier(s_etat_processus, tampon, |
caracteristiques_fichier(s_etat_processus, tampon, |
&existence, &ouverture, &unite); |
&existence, &ouverture, &unite); |
Line 1059 instruction_uchol(struct_processus *s_et
|
Line 1077 instruction_uchol(struct_processus *s_et
|
void |
void |
instruction_unlock(struct_processus *s_etat_processus) |
instruction_unlock(struct_processus *s_etat_processus) |
{ |
{ |
file *descripteur; |
|
|
|
struct flock lock; |
struct flock lock; |
|
|
|
struct_descripteur_fichier *descripteur; |
|
|
struct_objet *s_objet; |
struct_objet *s_objet; |
|
|
(*s_etat_processus).erreur_execution = d_ex; |
(*s_etat_processus).erreur_execution = d_ex; |
Line 1119 instruction_unlock(struct_processus *s_e
|
Line 1137 instruction_unlock(struct_processus *s_e
|
return; |
return; |
} |
} |
|
|
if (fcntl(fileno(descripteur), F_SETLK, &lock) == -1) |
if (fcntl(fileno((*descripteur).descripteur_c), F_SETLK, &lock) |
|
== -1) |
{ |
{ |
liberation(s_etat_processus, s_objet); |
liberation(s_etat_processus, s_objet); |
|
|