Thread View: comp.lang.rexx
4 messages
4 total messages
Started by Pierre Jelenc
Tue, 16 Apr 1996 21:14
Locking a file?
Author: Pierre Jelenc
Date: Tue, 16 Apr 1996 21:14
Date: Tue, 16 Apr 1996 21:14
15 lines
955 bytes
955 bytes
How can I lock a file in OS/2 so that one and only one process at a time
can modify it or its EA's? Would it be effective to mark the file as
"hidden" or "system", or is there a possibility of one process getting a
false reading between the time the other process decides to lock the file
and the time when the OS actually changes the attribute?
TIA
Pierre
--
Pierre Jelenc Know what's weird? Day by day nothing seems to
rcpj@panix.com change, but pretty soon everything is different.
pierre@nycbeer.org Calvin & Hobbes
http://www.columbia.edu/~pcj1/
Re: Locking a file?
Author: Koos Pol
Date: Wed, 17 Apr 1996 07:01
Date: Wed, 17 Apr 1996 07:01
28 lines
1643 bytes
1643 bytes
In <4l12kf$4m0@panix2.panix.com>, rcpj@panix.com (Pierre Jelenc) writes: > >How can I lock a file in OS/2 so that one and only one process at a time >can modify it or its EA's? Would it be effective to mark the file as >"hidden" or "system", or is there a possibility of one process getting a >false reading between the time the other process decides to lock the file >and the time when the OS actually changes the attribute? > >TIA > >Pierre >-- >Pierre Jelenc Know what's weird? Day by day nothing seems to >rcpj@panix.com change, but pretty soon everything is different. >pierre@nycbeer.org Calvin & Hobbes > http://www.columbia.edu/~pcj1/ Open the file in WRITE mode. (Atomic action) Koos ----------------------------------------------------------------- S.C. Pol Phone: +31 20 3116122 PC Systems Administrator Fax : +31 20 3116133 Compuware Europe email: koos_pol@compuware.com Amsterdam The Netherlands "Please DO disturb. I was working!" -----------------------------------------------------------------
Re: Locking a file?
Author: Pierre Jelenc
Date: Wed, 17 Apr 1996 14:27
Date: Wed, 17 Apr 1996 14:27
17 lines
1096 bytes
1096 bytes
Koos Pol <koos_pol@compuware.com> writes:
> In <4l12kf$4m0@panix2.panix.com>, rcpj@panix.com (Pierre Jelenc) writes:
> >
> >How can I lock a file in OS/2 so that one and only one process at a time
> >can modify it or its EA's?
>
> Open the file in WRITE mode. (Atomic action)
Does that lock the EA's as well? I cannot find any documentation as to how
SysPutEA() decides whether it has access to the file or not.
Pierre
--
Pierre Jelenc Know what's weird? Day by day nothing seems to
rcpj@panix.com change, but pretty soon everything is different.
pierre@nycbeer.org Calvin & Hobbes
http://www.columbia.edu/~pcj1/
Re: Locking a file?
Author: Pierre Jelenc
Date: Thu, 18 Apr 1996 20:49
Date: Thu, 18 Apr 1996 20:49
20 lines
1343 bytes
1343 bytes
Pierre Jelenc <rcpj@panix.com> writes:
>
> Does that lock the EA's as well? I cannot find any documentation as to how
> SysPutEA() decides whether it has access to the file or not.
And to follow up on myself, from the tests I've been able to perform it
seems that locking a file by opening it for write or read/write prevents
writing to the extended attributes.
How can one update data and extended attributes in such a way that the
file is protected from simultaneous write attempts by several processes?
If the file must be closed first, it can be grabbed by a competitor that
can clobber the EA's or prevent their update.
Pierre
--
Pierre Jelenc Know what's weird? Day by day nothing seems to
rcpj@panix.com change, but pretty soon everything is different.
pierre@nycbeer.org Calvin & Hobbes
http://www.columbia.edu/~pcj1/
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads