I used locks in these case
#Open a file open(SINGLECHECK,">.server1.pid") or $file->log("$0:Cannot open the lo +ck file $!\n"); #Lock the file in exclusive mode and non-blocking mode so that no two +same demon will run. flock(SINGLECHECK, LOCK_EX|LOCK_NB) or ($file->log("$0:server is Alrea +dy running\n") and exit(1));
In reply to Re: Abort if instance already running?
by lakshmananindia
in thread Abort if instance already running?
by pileofrogs
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |