Subject: [bug#41797] [PATCH] replace with-temporary-store-file

From: Ludovic Courtès <[email-masked]>
Date: Thu, 11 Jun 2020 19:04:32 +0200

Hi,

Caleb Ristvedt <[email-masked]> 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’.