/adei/trunk

To get this branch, use:
bzr branch http://darksoft.org/webbzr/adei/trunk

« back to all changes in this revision

Viewing changes to classes/logger.php

  • Committer: Suren A. Chilingaryan
  • Date: 2019-01-06 06:03:10 UTC
  • Revision ID: csa@suren.me-20190106060310-40z2rwmb62v17ynu
Provide TimedLock call and restrict amount of time we are waiting for the LOGGER lock

Show diffs side-by-side

added added

removed removed

Lines of Context:
578
578
    $umask = @umask(0);
579
579
 
580
580
        // File position after "a+" may get messed if multiple instances write the log unless we ensure single access already before openning
581
 
    if ($this->lock->Lock(LOCK::BLOCK|LOCK::EXCLUSIVE)) {
 
581
    if ($this->lock->TimedLock(LOCK::BLOCK|LOCK::EXCLUSIVE, LOGGER::TIMEOUT)) {
582
582
        $f = @fopen($fname, "a+");
583
583
        if ($f) {
584
584
//              No reason to replicate the lock