unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Caleb Ristvedt <caleb.ristvedt@cune.org>
Cc: 41797@debbugs.gnu.org
Subject: [bug#41797] [PATCH] replace with-temporary-store-file
Date: Thu, 11 Jun 2020 19:04:32 +0200	[thread overview]
Message-ID: <877dwdbkkf.fsf@gnu.org> (raw)
In-Reply-To: <87k10e5io6.fsf@cune.org> (Caleb Ristvedt's message of "Wed, 10 Jun 2020 23:29:45 -0500")

Hi,

Caleb Ristvedt <caleb.ristvedt@cune.org> skribis:

> with-temporary-store-file has a fundamental flaw: it assumes that if a
> temporary store file exists, is then added as a temporary root, and still
> exists, then it uniquely belongs to the current process.  This is not always
> the case, because the only criteria used for choosing temporary file names is
> that they not be currently used and fit a certain template.  This means it's
> entirely possible for another process to choose the same temporary file name
> if it doesn't exist at the time it chooses.

Then what about simply adding the PID to the file name template?

Trying to see if there’s a simpler solution that could address the
problem.

Thanks,
Ludo’.




  reply	other threads:[~2020-06-11 17:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-11  4:29 [bug#41797] [PATCH] replace with-temporary-store-file Caleb Ristvedt
2020-06-11 17:04 ` Ludovic Courtès [this message]
2020-06-22 18:03   ` Caleb Ristvedt

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://guix.gnu.org/

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

  git send-email \
    --in-reply-to=877dwdbkkf.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=41797@debbugs.gnu.org \
    --cc=caleb.ristvedt@cune.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).