in reply to RFC: config::simple vs config::ini

Whenever I see LOCK_UN, I think of File Locking Tricks and Traps, Trap #1: LOCK_UN. You usually are better served by letting files unlock as their handles fall out of scope or are explicitly closed. You're not writing to the files, so it's unlikely to matter, but LOCK_UN is not a useful part of most solutions. Its uses are complex and not common.


Dave

Replies are listed 'Best First'.
Re^2: RFC: config::simple vs config::ini
by thanos1983 (Parson) on May 21, 2014 at 07:25 UTC

    To: Davido,

    Nice!!!, I had no clue for that trap. Well I found that by closing the file the unlock happens automatically File Locking.

    So regarding the reason that I am using flock on reading. I was planning to possible extend my conf.ini file by writing into it while some processes might reading. I just wanted to compare the process with all having this extra feature (flock), before I conclude which one to use.

    Thank you for pointing out all this information, beginners like me learn so much.