On unix-like systems, file locking is advisory by default. This means that nobody else has to pay attention to anything you say about the file-lock state. Wikipedia has a nice entry on file locking that expands on the stuff already mentioned in perlfunc's entry for flock.
You want a mandatory lock that the system enforces. You don't implement this yourself (either through semaphores or other schemes). The solution to your task is complicated by the particular operating system you use, your filesystem set-up, and so on.
In your case, however, if the password changes, I think the CGI script should have to re-authenticate. That's the point of changing passwords. :)
In reply to Re: How to make sure that non-Perl programs will respect Perl's file locking?
by brian_d_foy
in thread How to make sure that non-Perl programs will respect Perl's file locking?
by glasswalk3r
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |