|
@@ -29,10 +29,7 @@ extern pid_t active;
|
|
|
int status_cmd = -1;
|
|
|
int result_cmd = -1;
|
|
|
char base_path[BUFFER_SIZE];
|
|
|
-
|
|
|
-/* --- Global --- */
|
|
|
pid_list pidlist;
|
|
|
-boolean fond = false;
|
|
|
|
|
|
int job = 1;
|
|
|
|
|
@@ -257,7 +254,9 @@ int run(CommandTab ct, int* status){
|
|
|
if(pid == 0){
|
|
|
int stat = 0;
|
|
|
ct.bck = 0;
|
|
|
- fond = true;
|
|
|
+ //Ignore les sigint
|
|
|
+ signal(SIGINT, SIG_IGN);
|
|
|
+ //Lance commande
|
|
|
result = run(ct, &stat);
|
|
|
//Message de fin + retour
|
|
|
if(result == SHELL_FAIL){
|
|
@@ -397,10 +396,6 @@ void handler(int sig){
|
|
|
pid_node* pn;
|
|
|
//Repositionne le gestionnaire (Ne marche plus apres 1 utilisation)
|
|
|
signal(SIGINT, handler);
|
|
|
- //Si on est en fond on est non concerné
|
|
|
- if(fond){
|
|
|
- return;
|
|
|
- }
|
|
|
//Si il y a un process actif on le coupe
|
|
|
printf("Active : %d\n", active);
|
|
|
if(active != -1){
|