[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Omaha.pm] Differences to expect when using flock() on different OS and Filesystems.



It wouldn't be the first time perl didn't (or couldn't) hide a scary OS behavior from the programmer. If you can't find anything on the subject, just write a test program to hammer flock() for a while and see if it grants two mutual locks on the same file. Win32:: might also have something that'd work for you and behaves better on that platform.

-----Original Message-----
From: omaha-pm-bounces+jharr=ist.unomaha.edu@pm.org [mailto:omaha-pm-bounces+jharr=ist.unomaha.edu@pm.org] On Behalf Of Larson, Timothy E.
Sent: Tuesday, April 21, 2009 9:15 AM
To: Perl Mongers of Omaha, Nebraska USA
Subject: Re: [Omaha.pm] Differences to expect when using flock() on different OS and Filesystems.

> 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).

The underlying implementation of Perl's flock() may differ widely based on OS (maybe flock(), lockf(), or fcntl()) but I'd think that Larry and co. would be careful enough to make sure the Perl version works everywhere.  One huge advantage of Perl disappears if you can't abstract away those OS differences.


Tim

--
      Tim Larson        AMT2 Unix Systems Administrator
          InterCall, a division of West Corporation

Be always sure you are right, then go ahead. - David Crockett

_______________________________________________
Omaha-pm mailing list
Omaha-pm@pm.org
http://mail.pm.org/mailman/listinfo/omaha-pm