www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/05/30/16:25:30

Message-Id: <199905302024.UAA06210@out1.ibm.net>
From: "Mark E." <snowball3 AT bigfoot DOT com>
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>, djgpp-workers AT delorie DOT com
Date: Sun, 30 May 1999 16:25:36 -0400
MIME-Version: 1.0
Subject: Re: enhancements to fcntl.c
References: <199905280131 DOT BAA105100 AT out2 DOT ibm DOT net>
In-reply-to: <Pine.SUN.3.91.990530120838.12571M-100000@is>
X-mailer: Pegasus Mail for Win32 (v3.11)
Reply-To: djgpp-workers AT delorie DOT com

> Also, Windows 9X has a dedicated function of Int 21h to get access
> bits by a handle (`fstat' uses it as well).  Perhaps it is better to
> use that method when we run on Windows 9X, since it is documented by
> Microsoft, instead of using undocumented internal DOS functions.

I tried it (21 71a6), but it doesn't return the modes from the open call 
(O_READONLY, etc.)  that F_GETFL is supposed to return like the SFT 
method does.

> It's possible that you might be able to change the inheritance bit by
> calling the IOCTL function 01 (Int 21h/AX=4401h).  My references seem
> to indicate that function 4400 returns bit 12 set for files open with
> the no-inherit bit.  Perhaps setting that bit and calling 4401 will
> make the file non-inheritable?  It's worth trying, I think.

I just tried this method, but unfortunately that bit 12 doesn't seem to 
have a meaning under Win 9x. As you mentioned, I am able to get the 
noinherit flag from the SFT. 

Mark

--- 
Mark Elbrecht, snowball3 AT bigfoot DOT com
http://snowball.frogspace.net/

- Raw text -


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