Message-Id: <5.0.1.4.0.20001201005653.025bd770@pop5.banet.net> X-Sender: usbanet DOT farley3 AT pop5 DOT banet DOT net X-Mailer: QUALCOMM Windows Eudora Version 5.0.1 Date: Fri, 01 Dec 2000 01:01:47 -0500 To: "Mark E." From: "Peter J. Farley III" Subject: Re: Locking fcntl() and flock() patches Cc: djgpp-workers AT delorie DOT com In-Reply-To: <3A26CFC0.4125.70F7C@localhost> 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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" 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 Precedence: bulk At 10:08 PM 11/30/00 -0500, Mark E. wrote: >> At 09:27 AM 11/30/00 -0500, Mark E. wrote: >> >> Does the IOCTL subfunction or poking the SFT allow to set the >> >> SH_DENY* bits for files that are already open? >> >> >You can fiddle with those flags in the SFT, but I haven't >> experimented >with them. >> >> OK, you folk are beyond my level of knowledge here. Are you saying >> there is an alternate way to set up read locks? Assuming that these >> bits can be set on an open file, how would it work? > >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? 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. And I also don't see anything in a JFT except the SFT number. Am I missing something there? It's only one byte per file in the JFT, right? --------------------------------------------------------- Peter J. Farley III (pjfarley AT dorsai DOT org OR pjfarley AT banet DOT net)