On Thu, 11 Feb 2010, David Arturo Macias Corona wrote:

Hi,

> Thanks, with these explanations now is more clear:
> - In Linux nothing prevent two applications open file in EXCLUSIVE
> from each side

No. In Linux and other POSIX system there is no EXCLUSIVE mode at all.
Only shared mode exists though some *nixes have kernel side support
to emulated DOS DENY flags usually to implement some file servers for
DOS/Windows machines. It's not standard functionality and we do not use
them.

> - Harbour applications can emulate EXCLUSIVE mode if them are build
> with this feature

It's enabled by default.

> - Maybe xHarbour have same feature if it was properly copied/implemented

Probably yes but I haven't tested it.

> - So EXCLUSIVE may work between Harbour-xHarbour applications if
> work properly in xHarbour

Yes but now there are some other problems in data sharing.
We have fixed CP support so it's not possible to share data
with xHarbour applications which uses incompatible CP implementation.
It will cause index file corruption so it's necessary to precisely
verify if both application uses the same binary collation order.
The same CP in both applications may not be enough.

> - hbnetio is an alternative in remote environment to properly manage
> EXCLUSIVE, in place of Samba

It's an alternative to properly manage all types of synchronization
locks not only EXCLUSIVE mode when files are accessed remotely using
SAMBA, NFS, MARS or any other file server.
It's also an alternative for system or network redirector limitations
like maximum file size, i.e. DOS applications using HBNETIO can work
with 64bit length file IO API if server running HBNETIO supports it.

> I found this old subject due I was searching for "locking-scheme" to
> ensure proper implementation.
> Until now my conclusions are:
> - Two applications, one build with Harbour and other with xHarbour
> may have locking-corruption problems if each one is using a
> different "locking scheme" in same RDD type
> So we must to check which is default "locking-scheme" in each
> compiler or force same in both

Yes.
But it's also true between two Harbour applications.
All of them have to use exactly the same locking schemes.

best regards,
Przemek
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to