Loading ...
Sorry, an error occurred while loading the content.
 

Flock Test?

Expand Messages
  • Perl
    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. Sara.
    Message 1 of 2 , Jul 29 2:11 PM
      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.

      Sara.






      [Non-text portions of this message have been removed]
    • Damien Carbery
      ... server or not? ... Write a small script with flock in it. If the script runs then it is supported on the server. I would assume if it is supported then
      Message 2 of 2 , Aug 1, 2003
        --- In perl-beginner@yahoogroups.com, "Perl" <perl-freak@h...> wrote:
        > 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.
        >
        > Sara.
        >

        Write a small script with 'flock' in it.
        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?
      Your message has been successfully submitted and would be delivered to recipients shortly.