Sender: rich AT phekda DOT freeserve DOT co DOT uk Message-ID: <3E5CD60E.63351BC4@phekda.freeserve.co.uk> Date: Wed, 26 Feb 2003 14:58:22 +0000 From: Richard Dawe X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.23 i586) X-Accept-Language: de,fr MIME-Version: 1.0 To: djgpp-workers AT delorie DOT com CC: Richard Dawe Subject: Re: fchmod, revision 3 [PATCH] References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Hello. Richard Dawe wrote: > > Hello. > > Here's revision 3 of the fchmod patch. The only change is that > it now returns ENOSYS, if the file name cannot be obtained > from fd_props, as suggested by Eli. > > This needs testing on DOS and Windows 2000/XP. [snip] Here are some results for DOS 7.1 (or whatever the DOS that comes with Windows '98 SE is called): Using fchmod to change a file from read-write to read-only seems to work, as long as you don't write to the file after the fchmod call. If you write after fchmod(..., S_IRUSR), then the file reverts to read-write. I will add a note to the fchmod info page. It seems that DOS does not have the same separation between open attributes and file attributes that Windows '98 SE (and '95 & ME?) does. I'm guessing that this is a consequence of the magical LFN API. Bye, Rich =] -- Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]