chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] [patch] remove the initial check on directory exista


From: Mario Domenech Goulart
Subject: Re: [Chicken-users] [patch] remove the initial check on directory existance
Date: Sat, 02 Feb 2013 10:57:37 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

Hi,

On Sat, 2 Feb 2013 16:54:19 +0100 Peter Bex <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]