GNU bug report logs - #24659
'mkdir' procedure is neither thread-safe nor safe (2.0.12)

Previous Next

Package: guile;

Reported by: ludo <at> gnu.org (Ludovic Courtès)

Date: Mon, 10 Oct 2016 16:41:02 UTC

Severity: important

Fixed in version 2.0.13

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

Full log


Message #13 received at 24659 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: <tomas <at> tuxteam.de>
Cc: 24659 <at> debbugs.gnu.org
Subject: Re: bug#24659: 'mkdir' procedure is neither thread-safe nor safe
 (2.0.12)
Date: Tue, 11 Oct 2016 11:13:19 +0200
Hi,

<tomas <at> tuxteam.de> skribis:

> On Mon, Oct 10, 2016 at 06:39:47PM +0200, Ludovic Courtès wrote:
>> Hello!
>
> [...]
>
>> Furthermore, AFAICS, the above logic is redundant with what the kernel
>> does anyway.  That is, in a single-threaded program,
>>
>>   mask = umask (0);
>>   umask (mask);
>>   mkdir (file, 0777 ^ mask);
>>
>> is equivalent to:
>>
>>   mkdir (file, 0777);
>>
>> Am I right that we should just remove these two ‘umask’ calls?
>
> According to umask(2), yes, you are right. Unless someone has been
> trying to work around some platform-specific bug/idiosyncracy.

I don’t think there was ever a good reason for this.

Fixed in 245608911698adb3472803856019bdd5670b6614.

Thanks for your feedback,
Ludo’.




This bug report was last modified 8 years and 286 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.