Re: FLOCK
[email protected] (Sean Davis)
| Newsgroups | perl.beginners.cgi |
|---|---|
| Message-ID | <[email protected]> |
Akbar Ehsan wrote: > Thanks for the response. > > Here is the situation. We have a web form that creates a tab-delimited > text file. We want to lock this file to clean up the file, may be for a > minute, so that if anyone submits a form request, it does not get > written to the. I have been looking at and reading about FLOCK and feel > it will not server the purpose. I am hoping to find out if someone knows > about some other function/module to lock a file for a brief period of > time. > In this situation, I would tag each file with a unique identifier (a session ID, for example, like tabdelimited.hd76283420kdfsak9a.txt). Then, multiple submissions create different files. Then, you can have a cron job or other cleanup script go through and remove the old or complete files. Sean