unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: <tomas@tuxteam.de>
To: 24659@debbugs.gnu.org
Subject: bug#24659: 'mkdir' procedure is neither thread-safe nor safe (2.0.12)
Date: Mon, 10 Oct 2016 20:25:37 +0200	[thread overview]
Message-ID: <20161010182537.GA27089@tuxteam.de> (raw)
In-Reply-To: <87pon8ma3w.fsf@gnu.org>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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.

Regards
- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlf73SEACgkQBcgs9XrR2kZehwCfQ+P2CMZt8doHe2tKi0u1Yc7f
RU0An0WY1oEq/b3vu/X1rNWjTP7ZxUsY
=7Jhs
-----END PGP SIGNATURE-----





  reply	other threads:[~2016-10-10 18:25 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 [this message]
2016-10-11  9:13   ` Ludovic Courtès

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=20161010182537.GA27089@tuxteam.de \
    --to=tomas@tuxteam.de \
    --cc=24659@debbugs.gnu.org \
    /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).