Mailing List Archive

Re: flock() doesn't work on Solaris
[.courtesy cc of this posting sent to cited author et al. via email]

In comp.lang.perl.misc, Sergei Barbarash <sgt@netmedia.co.il> writes:
:How can I create a lock file on Solaris? When I use flock() function,
:perl tells me:
:
:The flock() function is unimplemented on this machine
:
:However, a flock(3B) C function does exist on Solaris (3B is BSD
:compatibility man section).

If you upgrade to perl5.001m, which is the current stable version,
this is taken care of. At least, flock() will be emulated if need
be. I'm curious though why it isn't finding the normal version in
flock(3B) on Solaris. CC'd to porters for their consideration.

--tom
--
Tom Christiansen Perl Consultant, Gamer, Hiker tchrist@mox.perl.com
Because . doesn't match \n. [\0-\377] is the most efficient way to match
everything currently. Maybe \e should match everything. And \E would
of course match nothing. :-) --Larry Wall in <9847@jpl-devvax.JPL.NASA.GOV>
Re: flock() doesn't work on Solaris [ In reply to ]
On Wed, 20 Dec 1995, Tom Christiansen wrote:

> In comp.lang.perl.misc, Sergei Barbarash <sgt@netmedia.co.il> writes:
> :How can I create a lock file on Solaris? When I use flock() function,
> :perl tells me:
> :
> :The flock() function is unimplemented on this machine
> :
> :However, a flock(3B) C function does exist on Solaris (3B is BSD
> :compatibility man section).
>
> If you upgrade to perl5.001m, which is the current stable version,
> this is taken care of. At least, flock() will be emulated if need
> be. I'm curious though why it isn't finding the normal version in
> flock(3B) on Solaris. CC'd to porters for their consideration.

As the user mentions, flock(3B) is part of the BSD compatability package.
In general, the bsd (or -lucb) stuff doesn't mix well with the SVR4 base
of Solaris. I think the man page for flock has more information on this.

Andy Dougherty doughera@lafcol.lafayette.edu
Dept. of Physics
Lafayette College, Easton PA 18042