diff options
| -rw-r--r-- | exec.c | 10 |
1 files changed, 0 insertions, 10 deletions
@@ -159,9 +159,6 @@ char** make_cmd_args(Command command, ShellState* shstate) { arg_str_arr[j] = *get_from_StrVec(&arg_str_vec, j); } arg_str_arr[argcount] = NULL; - for (int k = 0; k < argcount; k++) { - printf("\t\tArg%d: %s\n", k, arg_str_arr[k]); - } return arg_str_arr; } @@ -180,10 +177,6 @@ typedef struct { void execute_command(ExecutableCommand cmd, int* pgid) { - printf("Stdin: %d vs %d. Stdout: %d vs %d.", cmd.stdin_fd, STDIN_FILENO, cmd.stdout_fd, STDOUT_FILENO); - for (int j = 0; cmd.args[j] != NULL; j++) { - printf("'%s'\n", cmd.args[j]); - } pid_t pid = fork(); if (pid == 0) { @@ -228,7 +221,6 @@ void run_pipeline(Pipeline pl, ShellState* shstate) { int last_pipe_fd; int pgid = -1; for (int i = 0; i < pl.count; i++) { - printf("\tCommand %d:\n", i); PipelineElement elem = *get_from_Pipeline(&pl, i); ExecutableCommand cmd = {.child_close_fds = make_IntVec(64), .parent_close_fds = make_IntVec(64)}; @@ -256,12 +248,10 @@ void run_pipeline(Pipeline pl, ShellState* shstate) { execute_command(cmd, &pgid); for (int j = 0; j < cmd.parent_close_fds.count; j++) { - printf("Closing %d\n", j); close(*get_from_IntVec(&cmd.parent_close_fds, j)); } } tcsetpgrp(STDIN_FILENO, pgid); while (waitpid(-pgid, NULL, 0) > 0); - printf("%d\n", pgid); tcsetpgrp(STDIN_FILENO, getpgrp()); } |
