As an off-shoot of my fork()/wait() discussion, I began researching the flock() function so I can ensure that the processes don't step on each other if they try to update the same file. In our code, 90% of the file updates in the section I'm working on are not going to conflict. In the remaining code, there are a couple files that will expose a race condition, so some sort of file locking will be needed.<br>
<br>A co-worker cast a vague warning that the flock() implementation varies widely based on the OS and filesystem it's working on. I Googled quite a bit last night and I can't find any specific examples of other warnings (and work-arounds).<br>
<br>This code is gonig to run on Unix based systems (Solaris, RedHat, SUSE, HPUX, AIX, etc) and the only OS-based Perl warnings I can find are related to how Perl reacts on Windows when compared to Unix. <br><br>Has anyone run into examples of flock() failing subiltly (or not-so subtily) between various flavors of Unix and/or filesystems?<br>
<br>Thanks,<br><br>Dan<br><br clear="all">"Quis custodiet ipsos custodes?" (Who can watch the watchmen?) -- from the Satires of Juvenal<br>"I do not fear computers, I fear the lack of them." -- Isaac Asimov (Author)<br>
** *** ***** ******* *********** *************<br>