Project

General

Profile

Todo #544

Restore locking

Added by Chris Buechler about 9 years ago. Updated almost 9 years ago.

Status:
Resolved
Priority:
High
Assignee:
-
Category:
-
Target version:
Start date:
04/24/2010
Due date:
% Done:

0%

Estimated time:

Description

Locking needs to be tested and re-enabled if fixed, or fixed in FreeBSD/PHP if not.

this is the commit to be reverted:
https://rcs.pfsense.org/projects/pfsense/repos/mainline/commits/6b605c976e6c47bc844a7e9ed1a899b828498607

Associated revisions

Revision b6c34bfc (diff)
Added by Ermal Luçi about 9 years ago

Ticket #544. Restore locking, seems w+ migh already lock the file sometimes. While there improve the locking to a read/write locking schema. Make the default locking a read only lock and if explicitly specified a write locking can be specified through LOCK_EX optional parameter to lock(). During config manipulation do the filesystem mounting in rw, if needed, before doing any locking to avoid possible problems and also to be consistent through out the code on the method used. Also update calls to config to lock exclusively where required.

History

#1 Updated by Ermal Luçi about 9 years ago

  • Status changed from New to Feedback

It seems the w+ mode was the culprit creating this.
Also moved the lock/unlock to support read/write locking schema by adding an optional parameter to lock() call if specified acquires an exclusive/write lock.

#2 Updated by Chris Buechler almost 9 years ago

  • Status changed from Feedback to Resolved

Also available in: Atom PDF