version 1.83, 2011/10/05 13:14:19
|
version 1.85, 2011/11/18 09:51:33
|
Line 1760 interruption3(int signal)
|
Line 1760 interruption3(int signal)
|
// l'erreur d'accès à la mémoire. On sort donc du programme quitte à |
// l'erreur d'accès à la mémoire. On sort donc du programme quitte à |
// ce qu'il reste des processus orphelins. |
// ce qu'il reste des processus orphelins. |
|
|
|
int ios; |
|
|
unsigned char message_1[] = "+++System : Uncaught access violation\n" |
unsigned char message_1[] = "+++System : Uncaught access violation\n" |
"+++System : Aborting !\n"; |
"+++System : Aborting !\n"; |
unsigned char message_2[] = "+++System : Stack overflow\n" |
unsigned char message_2[] = "+++System : Stack overflow\n" |
Line 1775 interruption3(int signal)
|
Line 1777 interruption3(int signal)
|
|
|
if (signal != SIGUSR2) |
if (signal != SIGUSR2) |
{ |
{ |
write(STDERR_FILENO, message_1, strlen(message_1)); |
ios = write(STDERR_FILENO, message_1, strlen(message_1)); |
} |
} |
else |
else |
{ |
{ |
write(STDERR_FILENO, message_2, strlen(message_2)); |
ios = write(STDERR_FILENO, message_2, strlen(message_2)); |
} |
} |
|
|
_exit(EXIT_FAILURE); |
_exit(EXIT_FAILURE); |
Line 1828 interruption_violation_access(void *adre
|
Line 1830 interruption_violation_access(void *adre
|
unsigned char message[] = "+++System : Trying to catch access " |
unsigned char message[] = "+++System : Trying to catch access " |
"violation\n"; |
"violation\n"; |
|
|
static int compteur_erreur = 0; |
static int compteur_erreur = 0; |
|
int ios; |
|
|
if ((gravite == 0) && (routine_recursive != 0)) |
if ((gravite == 0) && (routine_recursive != 0)) |
{ |
{ |
Line 1850 interruption_violation_access(void *adre
|
Line 1853 interruption_violation_access(void *adre
|
return(0); |
return(0); |
} |
} |
|
|
write(STDERR_FILENO, message, strlen(message)); |
ios = write(STDERR_FILENO, message, strlen(message)); |
|
|
if (pid_processus_pere == getpid()) |
if (pid_processus_pere == getpid()) |
{ |
{ |
Line 2010 signal_inject(struct_processus *s_etat_p
|
Line 2013 signal_inject(struct_processus *s_etat_p
|
void |
void |
interruption5(int signal) |
interruption5(int signal) |
{ |
{ |
|
int ios; |
|
|
unsigned char message[] = "+++System : SIGPIPE\n" |
unsigned char message[] = "+++System : SIGPIPE\n" |
"+++System : Aborting !\n"; |
"+++System : Aborting !\n"; |
|
|
Line 2020 interruption5(int signal)
|
Line 2025 interruption5(int signal)
|
envoi_signal_processus(pid_processus_pere, rpl_sigalrm); |
envoi_signal_processus(pid_processus_pere, rpl_sigalrm); |
} |
} |
|
|
write(STDERR_FILENO, message, strlen(message)); |
ios = write(STDERR_FILENO, message, strlen(message)); |
return; |
return; |
} |
} |
|
|
Line 2164 signal_hup(struct_processus *s_etat_proc
|
Line 2169 signal_hup(struct_processus *s_etat_proc
|
{ |
{ |
fclose(fichier); |
fclose(fichier); |
|
|
freopen(nom, "w", stdout); |
stdout = freopen(nom, "w", stdout); |
freopen(nom, "w", stderr); |
stderr = freopen(nom, "w", stderr); |
} |
} |
|
|
freopen("/dev/null", "r", stdin); |
stdin = freopen("/dev/null", "r", stdin); |
|
|
if (((*s_etat_processus).type_debug & d_debug_signaux) != 0) |
if (((*s_etat_processus).type_debug & d_debug_signaux) != 0) |
{ |
{ |
Line 2362 nom_segment(unsigned char *chemin, pid_t
|
Line 2367 nom_segment(unsigned char *chemin, pid_t
|
|
|
# ifdef IPCS_SYSV // !POSIX |
# ifdef IPCS_SYSV // !POSIX |
# ifndef OS2 // !OS2 |
# ifndef OS2 // !OS2 |
|
|
if ((fichier = malloc((strlen(chemin) + 1 + 256 + 1) * |
if ((fichier = malloc((strlen(chemin) + 1 + 256 + 1) * |
sizeof(unsigned char))) == NULL) |
sizeof(unsigned char))) == NULL) |
{ |
{ |