if you
you will truncate the file before you have it locked, this may not be what you want in a production system! Useopen(FILE, ">testing")
before you get the lock and then truncate() if you want to, er, truncate the file once its locked. Or lock a separate semaphore file who's contents are unimportant.open(FILE, ">>testing")
In reply to Re: How do I lock a file?
by danstuken
in thread How do I lock a file?
by vroom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |