Skip to content

Commit 7382504

Browse files
vstinnermiss-islington
authored andcommitted
pythongh-110429: Fix race condition in "make regen-all" (pythonGH-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 fb6c4ed) Co-authored-by: Victor Stinner <vstinner@python.org>
1 parent 93279cc commit 7382504

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Makefile.pre.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1396,8 +1396,8 @@ regen-pegen:
13961396
PYTHONPATH=$(srcdir)/Tools/peg_generator $(PYTHON_FOR_REGEN) -m pegen -q c \
13971397
$(srcdir)/Grammar/python.gram \
13981398
$(srcdir)/Grammar/Tokens \
1399-
-o $(srcdir)/Parser/parser.new.c
1400-
$(UPDATE_FILE) $(srcdir)/Parser/parser.c $(srcdir)/Parser/parser.new.c
1399+
-o $(srcdir)/Parser/parser.c.new
1400+
$(UPDATE_FILE) $(srcdir)/Parser/parser.c $(srcdir)/Parser/parser.c.new
14011401

14021402
.PHONY: regen-ast
14031403
regen-ast:

0 commit comments

Comments
 (0)