To make it completely bullet proof you'll need two semaphores. One to identify the "master" process and one to control access to the shared communication, whether it be ini file, registry or whatever.