delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/12/01/03:34:20

Date: Fri, 01 Dec 2000 10:06:58 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: "Peter J. Farley III" <pjfarley AT banet DOT net>
Message-Id: <4331-Fri01Dec2000100658+0200-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6
CC: snowball3 AT bigfoot DOT com, djgpp-workers AT delorie DOT com
In-reply-to: <5.0.1.4.0.20001201005653.025bd770@pop5.banet.net>
(pjfarley AT banet DOT net)
Subject: Re: Locking fcntl() and flock() patches
References: <5 DOT 0 DOT 1 DOT 4 DOT 0 DOT 20001130214616 DOT 025cb150 AT pop5 DOT banet DOT net>
<3A261D6D DOT 4791 DOT 3157C2 AT localhost> <5 DOT 0 DOT 1 DOT 4 DOT 0 DOT 20001201005653 DOT 025bd770 AT pop5 DOT banet DOT net>
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> Date: Fri, 01 Dec 2000 01:01:47 -0500
> From: "Peter J. Farley III" <pjfarley AT banet DOT net>
> >
> >A file handle's SH_DENY* flags are stored in the JFT like a lot of other 
> >flags passed to open(). If you manipulate them using undocumented 
> >methods, you just might be able to have a read lock for the whole file 
> >that can then be unlocked by fiddling with the handle's open flagst. 
> >However, I haven't tried this and I doubt it's worth the effort to work 
> >on this just to get one special case of read locks working.
> 
> OK, then we stay with the current F_RDLCK workaround, and allow whole-file 
> read locks as previously discussed?

I don't think it's worth the hassle, for now.  I think you need to
handle F_RDLCK as F_WRLCK.

> BTW, I was looking through RBIL, and I didn't see anything that suggested
> SH_DENY* equivalents in the SFT, but maybe I'm not reading the right 
> section.

All of the access bits you specify in the call to Int 21h AH=6Ch are
kept in the SFT.  The SFT is the only place where DOS keeps all it
knows about each open handle.

> And I also don't see anything in a JFT except the SFT number.

I think Mark mistakenly said JFT when he really meant SFT.  JFT indeed
holds only the index of the entry in the SFT.  SFT is where the real
info is stored.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019