Possible duplicate:
Preventing multiple process instances on Linux
I have a multi-threaded application that can be run as a deamon process or once with input parameters.
I want to make sure that if the application is launched as a deception process, the user is not allowed to start it again.
EDIT: After you all suggested going to the herds, I tried it and put it on the server. I know that there is a strange problem, when the servers bounce, they delete all the files, including the lock file :( How now?
source
share