Bug #2429 [ was DMD 1.037 and 2.020 releases]

Lars Ivar Igesund larsivar at igesund.net
Wed Dec 10 03:12:13 PST 2008


Spacen Jasset wrote:

> Fawzi Mohamed wrote:
>> On 2008-12-08 19:06:42 +0100, Kagamin <spam at here.lot> said:
>> 
>>> torhu Wrote:
>>>
>>>> Tango also opens files for writing with shared reading disabled by
>>>> default.  I'm not sure why, but maybe someone can remember the reason
>>>> for it.
>>>
>>> they just forgot? :)
>> 
>> consistency with windows as far as I know, so the program behaves the
>> same on windows and unix.
>> 
>> Fawzi
>> 
> Its not consistent with any other libraries of any other compilers I
> know of. The Linux implementation is in my opinion certainly incorrect.

On Windows, the "default" is not shared in the sense that that is what you get if you pass no specific sharing parameters (0). I'm not windows expert, but if I read the CreateFile docs correctly, having some form of sharing as default can be wrong (causing errors) in some cases?

On Posix, the situation is quite different in that sharing is default. In fact non-sharing is not enforced by the system such that it is up to the application to figure out whether it should stay away or not. 

I believe there is room for improvement, but I'm not sure the default should be different?

-- 
Lars Ivar Igesund
blog at http://larsivi.net
DSource, #d.tango & #D: larsivi
Dancing the Tango


More information about the Digitalmars-d-announce mailing list