Hi,
I have 10 processes running, each writing to the same file. I don't want multiple writers, so basically I am looking for a mutex/binary semaphore to protect file writes. The problem is I can't share the semaphore amongst 10 processes, so I am looking at using shared memory between 10 processes, and putting the semaphore inside shared memory so it can be accessed by each process.
Can anyone point me to documentation on this in C/C++ for Unix? Sample code to use this structure would be great.
Thanks