unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: <tomas@tuxteam.de>
Cc: 24659@debbugs.gnu.org
Subject: bug#24659: 'mkdir' procedure is neither thread-safe nor safe (2.0.12)
Date: Tue, 11 Oct 2016 11:13:19 +0200	[thread overview]
Message-ID: <871szn1c5s.fsf@gnu.org> (raw)
In-Reply-To: <20161010182537.GA27089@tuxteam.de> (tomas@tuxteam.de's message of "Mon, 10 Oct 2016 20:25:37 +0200")

Hi,

<tomas@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’.





      reply	other threads:[~2016-10-11  9:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-10 16:39 bug#24659: 'mkdir' procedure is neither thread-safe nor safe (2.0.12) Ludovic Courtès
2016-10-10 18:25 ` tomas
2016-10-11  9:13   ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871szn1c5s.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=24659@debbugs.gnu.org \
    --cc=tomas@tuxteam.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).