aboutsummaryrefslogtreecommitdiffstats
path: root/src/hush.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hush.c')
-rw-r--r--src/hush.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/hush.c b/src/hush.c
index 478103f..255a058 100644
--- a/src/hush.c
+++ b/src/hush.c
@@ -79,7 +79,6 @@ int main(int argc, char **argv) {
goto free_tokens;
}
- // print_commands(stdout, cmds);
for (command *cmd = cmds; cmd; cmd = cmd->next) {
pid_t result = execute_command(cmd);
@@ -88,9 +87,13 @@ int main(int argc, char **argv) {
}
}
+ print_commands(stdout, cmds);
+
for (command *cmd = cmds; cmd; cmd = cmd->next) {
if (cmd->pid > 0) {
+ fprintf(stderr, "Waiting for %d\n", cmd->pid);
waitpid(cmd->pid, NULL, 0);
+ fprintf(stderr, "%d completed\n", cmd->pid);
}
}