Can anyone give me a good example of a multi-process shared queue (FIFO) in C/C++?
Please note, I am not looking for a thread(pthread) based implementation. Although I welcome suggestions for multi-threaded as well..
Basically looking for something that can work with fork and exec, since I have an already written application using fork/exec.
** IPC Pipes are also something I'm not looking for, as they die if either of the processes sender/receiver dies *** I would like something which is not transient, i.e. the queue can wait for the other process to become active?
I've found solutions for threads in Intel TBB's and boost threading libraries. But I'm looking for something more in the shared memory domain.
For IPC (inter process communication) I've used pipes on a Unix system, here's an example.
This won't work on Windows, but if I were in your place I would look for a way to use pipes (or another IPC mechanisms).