Skip to content

Commit fb6c4ed

Browse files
authored
gh-110429: Fix race condition in "make regen-all" (#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.
1 parent d257479 commit fb6c4ed

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
@@ -1399,8 +1399,8 @@ regen-pegen:
13991399
PYTHONPATH=$(srcdir)/Tools/peg_generator $(PYTHON_FOR_REGEN) -m pegen -q c \
14001400
$(srcdir)/Grammar/python.gram \
14011401
$(srcdir)/Grammar/Tokens \
1402-
-o $(srcdir)/Parser/parser.new.c
1403-
$(UPDATE_FILE) $(srcdir)/Parser/parser.c $(srcdir)/Parser/parser.new.c
1402+
-o $(srcdir)/Parser/parser.c.new
1403+
$(UPDATE_FILE) $(srcdir)/Parser/parser.c $(srcdir)/Parser/parser.c.new
14041404

14051405
.PHONY: regen-ast
14061406
regen-ast:

0 commit comments

Comments
 (0)