Write Minishell Program that creates two child processes…Solution

Write Minishell Program that creates two child processes…Solution

Write a program called minishell that creates two child processes: one to execute ‘ls’ and the other
to execute ‘sort’. After the forks, the original parent process waits for both child processes to finish
before it terminates. The standard output of ‘ls’ process should be piped to the input to the ‘sort’
process. Make sure you close the unnecessary open files for the three processes.



Carefully study the examples provided: fork.c, myls.c, myshell.c, etc. You need to know how they
work in order for you to finish this assignment; the examples

fork.c (link where to find the example)https://drive.google.com/file/d/0B9b80md_Miu5bTN0cV9ndkZ5T1k/view?usp=sharing

myls.c (link where to find the example)https://drive.google.com/file/d/0B9b80md_Miu5N0ZvaGlRZDdRWjA/view?usp=sharing

myshell.c (link where to find the example)https://drive.google.com/file/d/0B9b80md_Miu5N0xyUFk0bGdDXzQ/view?usp=sharing
Powered by