[Top][All Lists]

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

bug#24659: 'mkdir' procedure is neither thread-safe nor safe (2.0.12)

From: Ludovic Courtès
Subject: bug#24659: 'mkdir' procedure is neither thread-safe nor safe (2.0.12)
Date: Tue, 11 Oct 2016 11:13:19 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)


<address@hidden> 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,

reply via email to

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