delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/11/30/22:07:58

From: "Mark E." <snowball3 AT bigfoot DOT com>
To: djgpp-workers AT delorie DOT com
Date: Thu, 30 Nov 2000 22:08:00 -0500
MIME-Version: 1.0
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

> 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

- Raw text -


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