On Sat, 23 Sep 2000, Gunther Birznieks wrote:

> At 11:46 AM 9/23/00 +0100, Matt Sergeant wrote:
> >On Sat, 23 Sep 2000, Teijo Aulin wrote:
> >
> > > Hi!
> > >
> > > I'm running Apache 1.3.12 with mod_perl 1.23 under Win98. I downloaded
> > > AutoRank from www.cgi-works.net and tried to run it. I got the following
> > > error message: "flock() unimplemented on this platform at (eval 11) 
> > line 4."
> > > I see that flock() is not implemented under win 98, so how can i fix this?
> > > What would be the similar function under win 98? I run many scripts that
> > > work on my server, so its not a matter of configuration. At least i think
> > > so. :)
> >
> >I tend to just wrap flock in an eval, so that it works on Win9x, that is
> >when I have to have something that works on that platform (not very
> >often).
> 
> Wouldn't that just make sure the preciously locked resource is no longer 
> actually locked? While mod_perl is still 1 thread on apache for windows and 
> so may work on that narrow case, that doesn't seem like the best advice to 
> hand out.

No longer locked? It can't ever be locked under Win9x because it doesn't
support the notion of file locking. The only thing you can hope to do is
implement some sort of flock based on writing a temporary file or
something. I guess there might be something on CPAN to help you do
this. But don't expect it to be reliable (same can occasionally be said of
flock() of course...).

-- 
<Matt/>

Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org | AxKit: http://axkit.org

Reply via email to