summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-10-05 20:49:32 (GMT)
committerGitHub <noreply@github.com>2023-10-05 20:49:32 (GMT)
commit779481ef15ea44bde76a45e1ddfcbc8b9a39809c (patch)
tree4a701a85c38e0fa7160d54b22b0a525181bb0ae0
parenta55c203104cedfa5f5c600671607ee2f31425690 (diff)
downloadcpython-779481ef15ea44bde76a45e1ddfcbc8b9a39809c.zip
cpython-779481ef15ea44bde76a45e1ddfcbc8b9a39809c.tar.gz
cpython-779481ef15ea44bde76a45e1ddfcbc8b9a39809c.tar.bz2
[3.11] gh-110429: Fix race condition in "make regen-all" (GH-110433) (#110439)
gh-110429: Fix race condition in "make regen-all" (GH-110433) "make regen-pegen" now creates a temporary file called "parser.c.new" instead of "parser.new.c". Previously, if "make clinic" was run in parallel with "make regen-all", clinic may try but fail to open "parser.new.c" if the temporay file was removed in the meanwhile. (cherry picked from commit fb6c4ed2bbb2a867d5f0b9a94656e4714be5d9c2) Co-authored-by: Victor Stinner <vstinner@python.org>
-rw-r--r--Makefile.pre.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in
index ba8e634..f84ab13 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1301,8 +1301,8 @@ regen-pegen:
PYTHONPATH=$(srcdir)/Tools/peg_generator $(PYTHON_FOR_REGEN) -m pegen -q c \
$(srcdir)/Grammar/python.gram \
$(srcdir)/Grammar/Tokens \
- -o $(srcdir)/Parser/parser.new.c
- $(UPDATE_FILE) $(srcdir)/Parser/parser.c $(srcdir)/Parser/parser.new.c
+ -o $(srcdir)/Parser/parser.c.new
+ $(UPDATE_FILE) $(srcdir)/Parser/parser.c $(srcdir)/Parser/parser.c.new
.PHONY=regen-ast
regen-ast: