I need to implement a handshake type protocol in to a small Linux program that uses named pipes to communicate with other processes. I've searched for a general implementation pattern for a handshake type protocol when using named pipes but I've not been able to turn anything up...
I simply can't believe that there isn't patterns to do this. Can someone point me to a possible resource?
In full disclosure this is for homework but implementing this pattern isn't the homework. We need to solve a problem within the homework code and I believe this to be a possible solution. The homework is implemented in C++ -- but the languages doesn't matter to me. I just don't want to reinvent the wheel....
Update: I have a feeling that this might be implemented with signals.
What I mean by handshake is that a child process reports to it's parent process that it is ready for work but does not proceed (even if there is something in the pipe) until the parent gives the go signal. In my working theory, I will have many child processes that need to report ready and wait for the go signal from the parent.