Systems Programming Homework

profileRock1027

Write a program that uses two pipes to enable bidirectional communication between a parent process and a child process.

The program should perform as follows:

  1. The parent process prompts the user to input a line of text via stdin
  2. If the received text is exit, both processes terminate.  Otherwise, the parent uses one of the pipes to send this text to the child process.
  3. The child process converts the received text to all uppercase and sends it back to the parent via the other pipe.
  4. The parent reads the data coming back from the child process and prints it to stdout
  5. [Go back to Step 1]

Upload your code (do your own work!) here as a single C file named abc123_loopback.c

    • 8 years ago
    • 20
    Answer(1)

    Purchase the answer to view it

    blurred-text
    NOT RATED
    • attachment
      abc123_loopback.c