Skip to content

Commit 779481e

Browse files
[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 fb6c4ed) Co-authored-by: Victor Stinner <[email protected]>
1 parent a55c203 commit 779481e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Makefile.pre.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,8 +1301,8 @@ regen-pegen:
13011301
PYTHONPATH=$(srcdir)/Tools/peg_generator $(PYTHON_FOR_REGEN) -m pegen -q c \
13021302
$(srcdir)/Grammar/python.gram \
13031303
$(srcdir)/Grammar/Tokens \
1304-
-o $(srcdir)/Parser/parser.new.c
1305-
$(UPDATE_FILE) $(srcdir)/Parser/parser.c $(srcdir)/Parser/parser.new.c
1304+
-o $(srcdir)/Parser/parser.c.new
1305+
$(UPDATE_FILE) $(srcdir)/Parser/parser.c $(srcdir)/Parser/parser.c.new
13061306

13071307
.PHONY=regen-ast
13081308
regen-ast:

0 commit comments

Comments
 (0)