mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
feature: Add a new locking framework that uses flock. (#6858)
Change locks to use flock, as pid checking is not sufficient when PID Namespaces are involved.
This commit is contained in:
committed by
Tony Murray
parent
f02b551145
commit
701fbbc29b
@@ -30,7 +30,7 @@ require __DIR__ . '/includes/init.php';
|
||||
|
||||
$options = getopt('d::');
|
||||
|
||||
set_lock('alerts');
|
||||
$alerts_lock = \LibreNMS\FileLock::lockOrDie('alerts');
|
||||
|
||||
if (isset($options['d'])) {
|
||||
echo "DEBUG!\n";
|
||||
@@ -60,4 +60,4 @@ if (!defined('TEST') && $config['alert']['disable'] != 'true') {
|
||||
echo 'End : '.date('r')."\r\n";
|
||||
}
|
||||
|
||||
release_lock('alerts');
|
||||
$alerts_lock->release();
|
||||
|
Reference in New Issue
Block a user