version 1.41, 2010/08/18 12:56:55
|
version 1.44, 2010/08/26 19:07:42
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.0.18 |
RPL/2 (R) version 4.0.19 |
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 189 rplinit(int argc, char *argv[], unsigned
|
Line 189 rplinit(int argc, char *argv[], unsigned
|
|
|
(*s_etat_processus).rpl_home = rpl_home; |
(*s_etat_processus).rpl_home = rpl_home; |
|
|
insertion_thread(s_etat_processus, d_vrai); |
|
|
|
pthread_mutexattr_init(&attributs_mutex); |
pthread_mutexattr_init(&attributs_mutex); |
pthread_mutexattr_settype(&attributs_mutex, PTHREAD_MUTEX_NORMAL); |
pthread_mutexattr_settype(&attributs_mutex, PTHREAD_MUTEX_NORMAL); |
pthread_mutex_init(&((*s_etat_processus).mutex), &attributs_mutex); |
pthread_mutex_init(&((*s_etat_processus).mutex), &attributs_mutex); |
Line 250 rplinit(int argc, char *argv[], unsigned
|
Line 248 rplinit(int argc, char *argv[], unsigned
|
|
|
# ifdef _BROKEN_SIGINFO |
# ifdef _BROKEN_SIGINFO |
creation_fifos_signaux(s_etat_processus); |
creation_fifos_signaux(s_etat_processus); |
|
|
# ifdef return |
# ifdef return |
# undef return |
# undef return |
# endif |
# endif |
# define return destruction_fifos_signaux(s_etat_processus); return |
# define return destruction_fifos_signaux(s_etat_processus); return |
# endif |
# endif |
|
|
|
insertion_thread(s_etat_processus, d_vrai); |
|
|
|
# ifndef OS2 |
localisation_courante(s_etat_processus); |
localisation_courante(s_etat_processus); |
|
# else |
|
if ((*s_etat_processus).erreur_systeme != d_es) |
|
{ |
|
if (((*s_etat_processus).localisation = malloc((strlen(d_locale) + 1) * |
|
sizeof(unsigned char))) == NULL) |
|
{ |
|
if ((*s_etat_processus).langue == 'F') |
|
{ |
|
uprintf("+++Système : Mémoire insuffisante\n"); |
|
} |
|
else |
|
{ |
|
uprintf("+++System : Not enough memory\n"); |
|
} |
|
|
|
return(EXIT_FAILURE); |
|
} |
|
|
|
strcpy((*s_etat_processus).localisation, d_locale); |
|
} |
|
# endif |
|
|
(*s_etat_processus).erreur_systeme = d_es; |
(*s_etat_processus).erreur_systeme = d_es; |
|
|
if ((*s_etat_processus).localisation == NULL) |
if ((*s_etat_processus).localisation == NULL) |
Line 443 rplinit(int argc, char *argv[], unsigned
|
Line 465 rplinit(int argc, char *argv[], unsigned
|
# else |
# else |
action.sa_handler = interruption4; |
action.sa_handler = interruption4; |
# endif |
# endif |
|
// SIGCONT ne doit pas pouvoir être appelé depuis son gestionnaire. |
action.sa_flags = SA_ONSTACK | SA_SIGINFO; |
action.sa_flags = SA_ONSTACK | SA_SIGINFO; |
|
|
if (sigaction(SIGSTART, &action, NULL) != 0) |
if (sigaction(SIGSTART, &action, NULL) != 0) |
Line 576 rplinit(int argc, char *argv[], unsigned
|
Line 599 rplinit(int argc, char *argv[], unsigned
|
# else |
# else |
action.sa_handler = interruption6; |
action.sa_handler = interruption6; |
# endif |
# endif |
action.sa_flags = SA_ONSTACK | SA_SIGINFO; |
action.sa_flags = SA_ONSTACK | SA_SIGINFO | SA_NODEFER; |
|
|
if (sigaction(SIGINJECT, &action, NULL) != 0) |
if (sigaction(SIGINJECT, &action, NULL) != 0) |
{ |
{ |
Line 600 rplinit(int argc, char *argv[], unsigned
|
Line 623 rplinit(int argc, char *argv[], unsigned
|
# else |
# else |
action.sa_handler = interruption9; |
action.sa_handler = interruption9; |
# endif |
# endif |
action.sa_flags = SA_ONSTACK | SA_SIGINFO; |
action.sa_flags = SA_ONSTACK | SA_SIGINFO | SA_NODEFER; |
|
|
if (sigaction(SIGABORT, &action, NULL) != 0) |
if (sigaction(SIGABORT, &action, NULL) != 0) |
{ |
{ |