Work 13: Check your pipes for leaks.

posted Nov 20, 2017, 7:19 AM by JonAlf Dyrland-Weaver
Write a program that does the following:
  • Creates 2 unnamed pipes
  • Forks off a child process
  • Sends a number from the parent to the child
  • The child should perform some arithmetic operation on that number, then send the new value to the parent
    • Do whatever math your heart desires
  • Display messages for each step of the process
Example output:
[parent] sending: 15
[child] doing maths on: 15
[parent] received: 225

github link