Hi,

On Sat, 2 Feb 2013 16:54:19 +0100 Peter Bex <[email protected]> wrote:

> On Sun, Feb 03, 2013 at 02:20:59AM +1100, richo wrote:
>> This patch removes the internal check for directory existance in
>> create-directory, meaning that it can be treated as atomic on platforms 
>> where mkdir(2) is.
>
> This makes it inconsistent with the documentation (which, iiuc is already
> the case on Windows).
>
> I think this patch shouldn't go through, the behavior is wrong.
> It's probably better to make it ignore EEXIST if you want it to be
> atomic.

Also, it's likely to break code that relies on the current
`create-directory' behavior.

OTOH, as far as I understand, the current `create-directory'
implementation is subject to race conditions, since the check/create
steps are not atomic.

Maybe it should just attempt to create the directory and ignore errors
when it cannot be created because it exists (maybe that's what Peter
suggests -- I'm not sure).


Best wishes.
Mario
-- 
http://parenteses.org/mario

_______________________________________________
Chicken-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to