Lab - IV
22 August 2019
In this lab, you will explore the use of pipes for
interprocess communication.
Problems:
- This is the most basic pipe program. A parent process
creates a pipe for communication with its child. The parent
process takes a txt file name as input from the user and writes
the contents of a file, one line at a time, into the pipe. The
child process reads the pipe and prints the output on the
screen.
- Implement the above program where the parent reads text
input from the user, converts all text into uppercase and
writes it to the screen. The child process reads input from
standard input and writes the output with line number
information to standard output. Now use dup2() to
pipe parent output to the child such that the child process
outputs line-numbered uppercase text on the screen.