From: "Mark E." To: djgpp-workers AT delorie DOT com Date: Thu, 30 Nov 2000 22:08:00 -0500 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: Locking fcntl() and flock() patches Message-ID: <3A26CFC0.4125.70F7C@localhost> In-reply-to: <5.0.1.4.0.20001130214616.025cb150@pop5.banet.net> References: <3A261D6D DOT 4791 DOT 3157C2 AT localhost> X-mailer: Pegasus Mail for Win32 (v3.12c) 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 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. Mark