Question: given the 2d array of pipes fd[numberOfPipes][2]. write a loop that fork each process to do a command using execvp then redirect the output stdout

given the 2d array of pipes fd[numberOfPipes][2]. write a loop that fork each process to do a command using execvp then redirect the output stdout to another process to do a task using system call dup2

This simulates the idea of Unix which combines multiple small programs to do a job. Each process does one small task then redirects its output to another process. The next process then will use the output from the previous process as input to perform the next task.

Do not write a complete program

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!