Mail Archives: djgpp-workers/2000/08/16/05:57:39
> Date: Wed, 16 Aug 2000 11:02:24 +0200
> From: Laurynas Biveinis <lauras AT softhome DOT net>
>
> One more thing is unclear: in open() there is another _open() call, if
> the first fail. I assume it is OK to get away with single _open() call
> in readlink(), if it has SH_DENYNO set?
I'm not sure I understand how readlink is going to call _open, but
opening a file with SH_DENYNO as the default is not always a good
idea. Take a look at the table of sharing behavior in RBIL, under
function 3Dh of Int 21: at least for SHARE.EXE it seems to say that,
if the file is open by another program in compatibility mode, and you
open it with SH_DENYNO, it fails if the file is not read-only
(whatever that means), even if, like in readlink, you open the file
for read-only access.
So perhaps we need the same two-step dance in readlink as well, just
to be on the safe side. This is a minefield, and we alrteady know
that RBIL doesn't tell the whole truth, either.
- Raw text -