How to check that another instance of program already running under UNIX system? And exit()
if so.
I'm already use file
with pid
on it when the process start. Then I check pid
that its exists. BUT time to time program run on unexpected behavior and I have tons of copies of the program running.