Lock file?

wxdqz

New Member
Hi,

I'm trying to write to a file which is critical for the server.

Lots of people will be using the script, so it *is* possible that two or more sessions will be active on the same file.

I don't want to mess it up so I wonder if someone knows how to lock a file until the file has been written to. It then can be unlocked.

And of course the second session has to wait until the other session has completed its process.

Any ideas?
 
Back
Top