mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
[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 fb6c4ed2bb)
Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
a55c203104
commit
779481ef15
1 changed files with 2 additions and 2 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue