Mail Archives: djgpp-workers/2003/02/26/14:01:08
Hello.
Richard Dawe wrote:
>
> Richard Dawe wrote:
> >
> > 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.
[snip]
After a little more testing: Actually, if you write to the file at all, then
the attributes will be read-write, when the file is closed.
I also tried modifying the test program to fsync the file after the write
calls, to ensure that all data had been written. This made no difference.
Bye, Rich =]
--
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]
- Raw text -