I hope this isn't a dumb question but is there a way to delete a file by descriptior or filehandle?
Here's my problem. I want to be able to in a sense "flock" abitrary resources via a central MLDBM file. Since this may have to work across NFS, etc, I decided to use a single lock file for the database while it is being accessed. (I've heard that flock isn't reliable over NFS.)
Since the module uses this lock file to control all access to all resources, I'm afraid that a process might get wedged and lock out all programs using it. If it can't get a lock after a timeout, it checks to see if the holder is still alive and if not delete the lock and go on it's way.
The updates we are doing are few and far between so I'm not worried about this performance bottleneck but what I am afraid of is that if someone compromised an account they could make a symlink to someone else's data. Now a more priviledge account comes along and after tiring of waiting... WHAM!
I realize I could check to see if it's a symlink but there is a race condition in-between. Any thoughts on how I could handle this would be greatly appreciated.
-Lee
"To be civilized is to deny one's nature."
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.