Greetings and salutations monks. I am stupidius, of the clan, Stupid. I am sent forth to you today to seek your wisdom in the matter of the flock function. Several scripts on mine website may run simultaneously, and they may requireth access to a certain file for reading and/or writing. What is the proper way to flock a file so that if that certain file is needed, the calling script will wait for it to be released if it is locked? I do not merely wish to lock it and have other scripts return errors, but rather, have each one wait there turn. I thank thee in advance, and my apologies for my poor rendition of Ye Old English.
Johnius Stupidius of the Stupid Clan
Are you posting in the right place? Check out Where do I post X? to know for sure.
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
Want more info? How to link
or How to display code and escape characters
are good places to start.