|
@@ -161,7 +161,7 @@ int main(int argc, char* argv[]) {
|
|
|
continue;
|
|
|
}
|
|
|
//Si aucune commande on passe
|
|
|
- printf("%d\n", ct.length);
|
|
|
+ printf("Nb cmd : %d\n", ct.length);
|
|
|
if(ct.length == 0){
|
|
|
clean_command(&ct);
|
|
|
continue;
|
|
@@ -220,7 +220,6 @@ int run(CommandTab ct){
|
|
|
//Parcours les commandes
|
|
|
for(int i = 0; i < ct.length; i++){
|
|
|
c = ct.cmd[i];
|
|
|
- printf("Cmd : %s\n", c->name);
|
|
|
//Si pipe avant
|
|
|
if(nextpipe){
|
|
|
//Si fin chaine pipe
|
|
@@ -273,7 +272,6 @@ int run(CommandTab ct){
|
|
|
} else {
|
|
|
result = exec_shell(c->name, c->argv);
|
|
|
}
|
|
|
- printf("%d\n", result);
|
|
|
//Reset IO
|
|
|
if(c->input != STDIN){
|
|
|
infd = redirect_fd(STDIN, infd);
|
|
@@ -294,7 +292,6 @@ int run(CommandTab ct){
|
|
|
}
|
|
|
}
|
|
|
//Fermeture tube
|
|
|
- printf("B %d\n", bpipe);
|
|
|
if(bpipe){
|
|
|
bpipe = false;
|
|
|
if(close(outfd) == ERR){
|