|
@ -250,6 +250,7 @@ int do_pipe(char **pipe_arg_1, char **pipe_arg_2) |
|
|
exit(0); |
|
|
exit(0); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
waitpid(prog_1, NULL, 0); |
|
|
|
|
|
|
|
|
if ((prog_2 = fork()) == 0) /* Child process 2 */ |
|
|
if ((prog_2 = fork()) == 0) /* Child process 2 */ |
|
|
{ |
|
|
{ |
|
@ -264,12 +265,11 @@ int do_pipe(char **pipe_arg_1, char **pipe_arg_2) |
|
|
exit(0); |
|
|
exit(0); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
waitpid(prog_2, NULL, 0); |
|
|
|
|
|
|
|
|
close(fds[0]); |
|
|
close(fds[0]); |
|
|
close(fds[1]); |
|
|
close(fds[1]); |
|
|
|
|
|
|
|
|
waitpid(prog_1, NULL, 0); |
|
|
|
|
|
waitpid(prog_2, NULL, 0); |
|
|
|
|
|
return 1; |
|
|
return 1; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|