- What could be the simplest test to check 'flock' working on your server or not?
except for writing to support team of host ::))
Thanks for any input.
[Non-text portions of this message have been removed]
- --- In firstname.lastname@example.org, "Perl" <perl-freak@h...> wrote:
> What could be the simplest test to check 'flock' working on yourserver or not?
>Write a small script with 'flock' in it.
> except for writing to support team of host ::))
> Thanks for any input.
If the script runs then it is supported on the server. I would assume
if it is supported then it works.
To confirm it works you could write two scripts. One would open a file
and flock it, sleep for a minute and then close and release the lock.
The other script would try to open the file in a manner that violates
the lock. The script would trap an error and report it.
(By 'your server' I am assuming you mean a remote CGI host)
Open two browser windows and invoke the first script and then invoke
the second script in the second window.
Is this too obvious?