[M3devel] random-acces I/O

Olaf Wagner wagner at elegosoft.com
Sun Mar 2 15:11:42 CET 2008


Quoting hendrik at topoi.pooq.com:

> On Sun, Mar 02, 2008 at 11:53:57AM +0100, Olaf Wagner wrote:
>> Quoting Dragiša Durić <dragisha at m3w.org>:
> In Linux, locking via fcntl is NFS-safe.  locking via flock is
> apparently not.  lockf is implemented via fcntl, so it is presumably
> NFS-safe, too, although the spoecifications don't actually require it to
> be implemented via fcntl.
>
> When I had NFS misconfigured (and I could find no information indicating
> how reconfigure it) one program (monotone) could not lock any NFS files,
> knwew it, and refused to operate as a result.   That's the safe way
> to deal with NFS misconfiguration.  I was annoyed, but overall I was
> quite impressed.  I suspect it used fcntl, though maybe I should ask.
> The NFS configuration problem went away on its own during upgrades of
> etch (which at the time was Debian testing).  I have no idea what the
> problem was.
>
> What primitive does Modula 3 use on Linux systems to perform locking?
> Let me hope for fcntl. Or lockf.  But not flock.


fcntl. See  
http://www.opencm3.net/doc/help/gen_html/libm3/src/os/POSIX/FilePosix.m3.html

Olaf
-- 
Olaf Wagner -- elego Software Solutions GmbH
                Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23 45 86 96  mobile: +49 177 2345 869  fax: +49 30 23 45 86 95
    http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194




More information about the M3devel mailing list