révision.
This commit is contained in:
parent
58c13fb927
commit
4cdaace8d0
1 changed files with 5 additions and 10 deletions
|
@ -14,6 +14,9 @@ use Evoauth::Iptables;
|
|||
|
||||
$SIG{INT} = $SIG{TERM} = $SIG{KILL} = "";
|
||||
|
||||
sysopen(LOCK, "/tmp/evoauth.lock", O_WRONLY|O_EXCL|O_CREAT)
|
||||
or die "Le verouillage a chou.";
|
||||
|
||||
# choix des options
|
||||
my %options=();
|
||||
getopts("icsrd:a:",\%options);
|
||||
|
@ -46,13 +49,5 @@ 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);
|
||||
}
|
||||
close LOCK;
|
||||
unlink "/tmp/evoauth.lock";
|
||||
|
|
Reference in a new issue