From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Newsgroups: gmane.lisp.guile.bugs Subject: bug#24659: 'mkdir' procedure is neither thread-safe nor safe (2.0.12) Date: Mon, 10 Oct 2016 20:25:37 +0200 Message-ID: <20161010182537.GA27089@tuxteam.de> References: <87pon8ma3w.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; x-action=pgp-signed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1476124052 25766 195.159.176.226 (10 Oct 2016 18:27:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 10 Oct 2016 18:27:32 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: 24659@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Mon Oct 10 20:27:28 2016 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1btfID-00056g-Dg for guile-bugs@m.gmane.org; Mon, 10 Oct 2016 20:27:17 +0200 Original-Received: from localhost ([::1]:51938 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btfIB-0003D2-R9 for guile-bugs@m.gmane.org; Mon, 10 Oct 2016 14:27:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55216) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btfI2-0003Ag-4P for bug-guile@gnu.org; Mon, 10 Oct 2016 14:27:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1btfHx-0000Ym-UI for bug-guile@gnu.org; Mon, 10 Oct 2016 14:27:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45263) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btfHx-0000Yf-RO for bug-guile@gnu.org; Mon, 10 Oct 2016 14:27:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1btfHx-0006of-Kk for bug-guile@gnu.org; Mon, 10 Oct 2016 14:27:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 10 Oct 2016 18:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24659 X-GNU-PR-Package: guile X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.147612396726136 (code B ref -1); Mon, 10 Oct 2016 18:27:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 10 Oct 2016 18:26:07 +0000 Original-Received: from localhost ([127.0.0.1]:51453 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1btfH5-0006nU-Kl for submit@debbugs.gnu.org; Mon, 10 Oct 2016 14:26:07 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35532) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1btfH4-0006n1-8u for submit@debbugs.gnu.org; Mon, 10 Oct 2016 14:26:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1btfGx-0000Dy-JG for submit@debbugs.gnu.org; Mon, 10 Oct 2016 14:26:00 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:48728) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btfGx-0000Dq-GV for submit@debbugs.gnu.org; Mon, 10 Oct 2016 14:25:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54723) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btfGu-0002S4-Hy for bug-guile@gnu.org; Mon, 10 Oct 2016 14:25:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1btfGr-0000Cw-AW for bug-guile@gnu.org; Mon, 10 Oct 2016 14:25:56 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:46995 helo=tomasium.tuxteam.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btfGr-0000AJ-4Z for bug-guile@gnu.org; Mon, 10 Oct 2016 14:25:53 -0400 Original-Received: from tomas by tomasium.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1btfGb-000789-9P for bug-guile@gnu.org; Mon, 10 Oct 2016 20:25:37 +0200 In-Reply-To: <87pon8ma3w.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.org gmane.lisp.guile.bugs:8422 Archived-At: -----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-----