in reply to Re^2: disable possible threads
in thread disable possible threads

also since the location is the important factor storing PID wouldn't be of any use , would it ??????

Yes, you can use PID along with the signals to prevent cases when the process is forced to die. As for the location you can use the same file to store location information for running instances as well. But probably you know that already.

You may also consider listening on a port and use sockets to request permission from the first instance. The fact that you can only listen a port once can be useful. Then you can store all information you need in a file and let the first instance control others.