This commit is contained in:
Alexandre Anriot 2005-10-12 19:35:59 +00:00
parent f500a11ffb
commit 58c13fb927
1 changed files with 12 additions and 0 deletions

View File

@ -6,6 +6,7 @@ use strict;
use warnings;
use Getopt::Std;
use Config::Tiny;
use Fcntl;
use Evoauth::Admin;
use Evoauth::Functions;
@ -44,3 +45,14 @@ sub Usage() {
exit;
}
BEGIN {
sysopen(LOCK, "/tmp/evoauth.lock", O_WRONLY|O_EXCL|O_CREAT, 0644)
or die "Verouillage en cours, sortie : $!";
flock(LOCK, 2);
}
END {
close (LOCK);
}