On Mon, Aug 27, 2007 at 10:33:21AM -0700, Jeff Zucker wrote: > Tim Bunce wrote: > > On Sun, Aug 26, 2007 at 11:41:08PM +0200, Bart Lateur wrote: > t/41prof_dump.............flock() unimplemented on this platform at > > Try the appended patch and let me know if it works for you. > > +my $HAS_FLOCK = do { local $@; eval { flock STDOUT, 0; 1 } }; > > While that's the method I use in DBD::File, there appear to be some > phantom problems with it. I think that you can get a true value > for that but still not be able to call flock(). So I get (rare) > reports of tests hanging when flock() is called even if it is only > called when $HAS_FLOCK is true. If I recall correctly, from users > with NFS.
With NFS and running the test in an NFS mounted filesystem, probably. NFS implementations can suffer problems with lock daemons. > I'm not sure if there is a good solution. I've changed the code so the default can be overridden via an env var and callers can force use of non-use of flock. That'll do for now. Thanks Jeff. Tim.