Quote:
Originally Posted by
chercheur857
I want do the checkpoint of an application strongly coupled
OK, maybe I am a bit slow, but i haven't understood what you mean the first time and i don't understand it now.
If i get you correctly you want to write an application. When this program comes to a certain point of its execution you want other applications (parallel running instances of the same application?) be aware of that fact. Is that correct?
If so, then a simple semaphore file would suffice, yes? You simply create this file and query its existence from the other instances you run. This would be a "passive" (polling) approach.
The "active" variant would be that the application doesn't set a flag (the file) and wait for other instances to become aware of its existence, but actively notify the other instances. You could use a signal for this. When the program gets to the certain point it will work through a list of PIDs with the programs to notify and send every one of them a certain signal (issue
kill -l on your system for a list of supported signals, see the man page of sigaction() for how to install POISX-compliant signal handlers).
I hope this helps.
bakunin