version 1.183, 2016/03/22 17:12:14
|
version 1.194, 2017/07/02 22:28:20
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.1.25 |
RPL/2 (R) version 4.1.27 |
Copyright (C) 1989-2016 Dr. BERTRAND Joël |
Copyright (C) 1989-2017 Dr. BERTRAND Joël |
|
|
This file is part of RPL/2. |
This file is part of RPL/2. |
|
|
Line 126 rplinit(int argc, char *argv[], char *en
|
Line 126 rplinit(int argc, char *argv[], char *en
|
nombre_thread_surveillance_processus = 0; |
nombre_thread_surveillance_processus = 0; |
pid_processus_pere = getpid(); |
pid_processus_pere = getpid(); |
|
|
|
# ifdef DEBUG_PROC |
|
__proc = 0; |
|
# endif |
|
|
# ifdef DEBUG_MEMOIRE |
# ifdef DEBUG_MEMOIRE |
debug_memoire_initialisation(); |
debug_memoire_initialisation(); |
# endif |
# endif |
Line 441 rplinit(int argc, char *argv[], char *en
|
Line 445 rplinit(int argc, char *argv[], char *en
|
|
|
if ((*s_etat_processus).langue == 'F') |
if ((*s_etat_processus).langue == 'F') |
{ |
{ |
printf("+++Copyright (C) 1989 à 2015, 2016 BERTRAND Joël\n"); |
printf("+++Copyright (C) 1989 à 2016, 2017 BERTRAND Joël\n"); |
} |
} |
else |
else |
{ |
{ |
printf("+++Copyright (C) 1989 to 2015, 2016 BERTRAND Joel\n"); |
printf("+++Copyright (C) 1989 to 2016, 2017 BERTRAND Joel\n"); |
} |
} |
} |
} |
|
|
Line 672 rplinit(int argc, char *argv[], char *en
|
Line 676 rplinit(int argc, char *argv[], char *en
|
return(EXIT_FAILURE); |
return(EXIT_FAILURE); |
} |
} |
|
|
if (sigaction(SIGALRM, &action, NULL) != 0) |
if (sigaction(SIGUSR2, &action, NULL) != 0) |
{ |
{ |
# ifndef SEMAPHORES_NOMMES |
# ifndef SEMAPHORES_NOMMES |
sem_post(&((*s_etat_processus).semaphore_fork)); |
sem_post(&((*s_etat_processus).semaphore_fork)); |
Line 706 rplinit(int argc, char *argv[], char *en
|
Line 710 rplinit(int argc, char *argv[], char *en
|
} |
} |
|
|
signal_test = SIGTEST; |
signal_test = SIGTEST; |
raise(SIGALRM); |
raise(SIGUSR2); |
|
|
attente.tv_sec = 0; |
attente.tv_sec = 0; |
attente.tv_nsec = 1000000; |
attente.tv_nsec = 1000000; |
Line 716 rplinit(int argc, char *argv[], char *en
|
Line 720 rplinit(int argc, char *argv[], char *en
|
nanosleep(&attente, NULL); |
nanosleep(&attente, NULL); |
} |
} |
|
|
if (signal_test != SIGALRM) |
if (signal_test != SIGUSR2) |
{ |
{ |
# ifndef SEMAPHORES_NOMMES |
# ifndef SEMAPHORES_NOMMES |
sem_post(&((*s_etat_processus).semaphore_fork)); |
sem_post(&((*s_etat_processus).semaphore_fork)); |
Line 5697 rplinit(int argc, char *argv[], char *en
|
Line 5701 rplinit(int argc, char *argv[], char *en
|
|
|
retrait_thread(s_etat_processus); |
retrait_thread(s_etat_processus); |
|
|
|
attente.tv_sec = 0; |
|
attente.tv_nsec = GRANULARITE_us * 1000; |
|
|
|
while(nombre_thread_surveillance_processus != 0) |
|
{ |
|
nanosleep(&attente, NULL); |
|
INCR_GRANULARITE(attente.tv_nsec); |
|
} |
|
|
pthread_mutex_destroy(&((*s_etat_processus).mutex_pile_processus)); |
pthread_mutex_destroy(&((*s_etat_processus).mutex_pile_processus)); |
pthread_mutex_destroy(&((*s_etat_processus).mutex_allocation)); |
pthread_mutex_destroy(&((*s_etat_processus).mutex_allocation)); |
pthread_mutex_destroy(&((*s_etat_processus).mutex_interruptions)); |
pthread_mutex_destroy(&((*s_etat_processus).mutex_interruptions)); |
Line 5775 informations(struct_processus *s_etat_pr
|
Line 5788 informations(struct_processus *s_etat_pr
|
printf(" -i : fonctionnement interactif\n"); |
printf(" -i : fonctionnement interactif\n"); |
printf(" -l : licence d'utilisation\n"); |
printf(" -l : licence d'utilisation\n"); |
printf(" -n : ignorance du signal HUP\n"); |
printf(" -n : ignorance du signal HUP\n"); |
|
printf(" -m : chargement d'un module RPL/SO avant la " |
|
"compilation\n"); |
printf(" -p : précompilation du script avant exécution\n"); |
printf(" -p : précompilation du script avant exécution\n"); |
printf(" -P : profilage (-P ou -PP)\n"); |
printf(" -P : profilage (-P ou -PP)\n"); |
printf(" -s : empêchement de l'ouverture de l'écran initial\n"); |
printf(" -s : empêchement de l'ouverture de l'écran initial\n"); |
Line 5796 informations(struct_processus *s_etat_pr
|
Line 5811 informations(struct_processus *s_etat_pr
|
printf(" -i : runs the RPL/2 sequencer in interactive mode\n"); |
printf(" -i : runs the RPL/2 sequencer in interactive mode\n"); |
printf(" -l : prints the user licence of the software\n"); |
printf(" -l : prints the user licence of the software\n"); |
printf(" -n : ignores HUP signal\n"); |
printf(" -n : ignores HUP signal\n"); |
|
printf(" -m : loads RPL/SO object before compilation\n"); |
printf(" -p : precompiles script\n"); |
printf(" -p : precompiles script\n"); |
printf(" -P : computes profile data (-P or -PP)\n"); |
printf(" -P : computes profile data (-P or -PP)\n"); |
printf(" -s : disables splash screen\n"); |
printf(" -s : disables splash screen\n"); |