Question: 2. Write a program called minishell that creates two child processes: one to execute 'Is -al' and the other to execute 'grep minishell.c'. After the

2. Write a program called minishell that creates two child processes: one to execute 'Is -al' and the other to execute 'grep minishell.c'. After the forks, the original parent process waits for both child processes to finish before it terminates. The parent should print out the pid of each child after it finishes. The standard output of 'Is -al' process should be piped to the input to the 'grep minishell.c' process. Make sure you close the unnecessary open files for the three processes. The output should be the one line that includes the directory entry for minishell.c. You will need to call the source file minishell.c for this to work properly
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
