I'm not sure if this possible, but who knows that I'm over thinking (again):
I have a compiled script that I put on network share folder (it's stored at FreeBSD machine with SMB protocol).
This script is accessible by many users on many machines that connected to the LAN.
When the script run, how can it know how many instance is it running on all of those machines?
I dont need to know who and which machine is running it, but I need to know is there more than 1 instance
running it now (on whichever machine, I dont care)?
In other word, this script would like to know, is it in used (openned/executed by any machines) except by himself right now?
I'm asking this because I would like to do self update, and I cant do it when there is a user access/execute it.
Something like:
IMPOSSIBLE?