Re: [Gambas-user] How to lock a file

2008-10-08 Thread Rolf-Werner Eilert
Doriano Blengino schrieb: > Rolf-Werner Eilert ha scritto: >> Alright, but it doesn't delete the lock-file with UNLOCK, and the >> lock-file has standard rights rw-r--r-- (644), so no other user than the >> one who has created it should be able to delete it. Up to now, I just >> tested it on my

Re: [Gambas-user] How to lock a file

2008-10-08 Thread Doriano Blengino
Rolf-Werner Eilert ha scritto: > > Alright, but it doesn't delete the lock-file with UNLOCK, and the > lock-file has standard rights rw-r--r-- (644), so no other user than the > one who has created it should be able to delete it. Up to now, I just > tested it on my own account with a file from m

Re: [Gambas-user] How to lock a file

2008-10-08 Thread Rolf-Werner Eilert
Benoit Minisini schrieb: > On mardi 07 octobre 2008, Rolf-Werner Eilert wrote: >> Benoit Minisini schrieb: >>> On mardi 07 octobre 2008, nando wrote: There is a problem with your method. Between the execution of the KILL and the CREATION of the file, multitasking happens and another

Re: [Gambas-user] How to lock a file

2008-10-07 Thread Benoit Minisini
On mardi 07 octobre 2008, Rolf-Werner Eilert wrote: > Benoit Minisini schrieb: > > On mardi 07 octobre 2008, nando wrote: > >> There is a problem with your method. > >> Between the execution of the KILL and the CREATION of the file, > >> multitasking happens and another task could create the file j

Re: [Gambas-user] How to lock a file

2008-10-07 Thread Rolf-Werner Eilert
Benoit Minisini schrieb: > On mardi 07 octobre 2008, nando wrote: >> There is a problem with your method. >> Between the execution of the KILL and the CREATION of the file, >> multitasking happens and another task could create the file just before >> the original thread executed the CREATE. >> >> I

Re: [Gambas-user] How to lock a file

2008-10-07 Thread Rolf-Werner Eilert
ds Rolf > > -Fernando > > > -- Original Message --- > From: Rolf-Werner Eilert <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED], mailing list for gambas users > > Sent: Tue, 07 Oct 2008 10:47:02 +0200 > Subject: Re: [Gambas-user] How to lock a file &

Re: [Gambas-user] How to lock a file

2008-10-07 Thread Benoit Minisini
On mardi 07 octobre 2008, nando wrote: > There is a problem with your method. > Between the execution of the KILL and the CREATION of the file, > multitasking happens and another task could create the file just before > the original thread executed the CREATE. > > In different words, if the first t

Re: [Gambas-user] How to lock a file

2008-10-07 Thread nando
y thereafter to release the lock and cannot hog the lock. -Fernando -- Original Message --- From: Rolf-Werner Eilert <[EMAIL PROTECTED]> To: [EMAIL PROTECTED], mailing list for gambas users Sent: Tue, 07 Oct 2008 10:47:02 +0200 Subject: Re: [Gambas-user] How to lock a file > F

Re: [Gambas-user] How to lock a file

2008-10-07 Thread Benoit Minisini
On mardi 07 octobre 2008, Rolf-Werner Eilert wrote: > For my apps in Gambas, I use lockfiles, not folders, to lock a certain > file. Experience told me that "sometimes" when two users/processes want > to access the same file, these may overlap. So I added an identification > method and a time delay

Re: [Gambas-user] How to lock a file

2008-10-07 Thread Rolf-Werner Eilert
ba to share > the lock on both the linux and windows side. > -Fernando > > > -- Original Message ------- > From: Benoit Minisini <[EMAIL PROTECTED]> > To: mailing list for gambas users > Sent: Fri, 26 Sep 2008 23:51:57 +0200 > Subject: Re: [Gambas-user] How

Re: [Gambas-user] How to lock a file

2008-10-07 Thread nando
ROTECTED]> To: mailing list for gambas users Sent: Fri, 26 Sep 2008 23:51:57 +0200 Subject: Re: [Gambas-user] How to lock a file > On vendredi 26 septembre 2008, Almanova Sistemi wrote: > > I need to lock the file to avoid writing by another user in multiuser > > environme

Re: [Gambas-user] How to lock a file

2008-09-26 Thread Benoit Minisini
On vendredi 26 septembre 2008, Almanova Sistemi wrote: > I need to lock the file to avoid writing by another user in multiuser > environment > Sorry for that, the documentation is completely false. But who wrote it? :-) The LOCK instruction does not lock a specific stream not a stream, but instea

Re: [Gambas-user] How to lock a file

2008-09-26 Thread Almanova Sistemi
st for gambas users > Sent: Wed, 24 Sep 2008 15:40:53 +0200 > Subject: [Gambas-user] How to lock a file > > >> Hi, >> >> I have a problem with LOCK >> >> I am writing an application in gambas (2.7.0-2.1) on opensuse 10.3 - >> 11.0 and I need to lock

Re: [Gambas-user] How to lock a file

2008-09-25 Thread nando
Can you tell why you have to lock it.. for what reason? -- Original Message --- From: Almanova Sistemi <[EMAIL PROTECTED]> To: mailing list for gambas users Sent: Wed, 24 Sep 2008 15:40:53 +0200 Subject: [Gambas-user] How to lock a file > Hi, > > I have a pr

[Gambas-user] How to lock a file

2008-09-24 Thread Almanova Sistemi
Hi, I have a problem with LOCK I am writing an application in gambas (2.7.0-2.1) on opensuse 10.3 - 11.0 and I need to lock a file after open it. My code: ... DIM hfile as File DIM sNameFile as String sNameFile = "SomeFile" hfile = OPEN sNameFile FOR INPUT OUTPUT TRY LOCK hfile IF ERROR then

Re: [Gambas-user] How to lock a file

2008-09-18 Thread Almanova Sistemi
No, because if I change the line where I open the file: hfile = OPEN "/usr/far/alman/NOMEFARM.DAT" FOR read wtite I obtain the same message. Fabien Bodard ha scritto: > # If the READ or WRITE keyword are specified, then the input-output > are not buffered. > > # If the INPUT or OUTPUT keyword a

Re: [Gambas-user] How to lock a file

2008-09-17 Thread Fabien Bodard
# If the READ or WRITE keyword are specified, then the input-output are not buffered. # If the INPUT or OUTPUT keyword are specified, then the input-output are buffered. Maybe for that ? 2008/9/17 Almanova Sistemi <[EMAIL PROTECTED]>: > Hi, > > is the first time that I write to list, but i hav

[Gambas-user] How to lock a file

2008-09-17 Thread Almanova Sistemi
Hi, is the first time that I write to list, but i have a problem. I am writing an application in gambas (2.7.0-2.1) on opensuse 10.3 - 11.0 and I need to lock a file when I open it. My code: ... hfile = OPEN "/usr/far/alman/NOMEFARM.DAT" FOR INPUT OUTPUT TRY LOCK hfile IF ERROR then ... END