2

I got school project in which I need to write a program that forks to 3 child process and they need to communicate:

stdin --> PID1 ---fifo---> PID2 ---file---> PID3 ---> stdout

CH2 translates that data to hex string. I also need to implement pause for whole program. My question is: do I need to implement synchronization mechanisms such as semaphores?

coder
  • 12,832
  • 5
  • 39
  • 53
voidmat
  • 113
  • 3
  • 12
  • 3
    Yes, you need - for the PID2->PID3 stage. A fifo is self-synchronized, but a file is not. – DYZ Jan 18 '17 at 20:51

0 Answers0