From 616bc8d4fa3127ae55b87f955deb34f70da94e3f Mon Sep 17 00:00:00 2001 From: Martijn Dekker Date: Fri, 2 Aug 2024 00:55:57 +0100 Subject: [PATCH] build: iffe: fix parallel tmp file handling (re: ced499a3) Already found the first problem when testing parallel build on a nice and fast system: the temp files of two or more iffe(1) feature testing invocations were overwriting each other as they were using the same file name. src/cmd/INIT/iffe.sh: - Delete convoluted and nonsensical AT&T logic for determing a temp file name. The current process ID, $$, was added and then removed again if the name got longer than a certain threshold, which could cause different iffe invocations to use the same temp file name. Instead, just use ./iffe.$$ and be done with it. --- src/cmd/INIT/iffe.sh | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/src/cmd/INIT/iffe.sh b/src/cmd/INIT/iffe.sh index 0b5a7b6b0100..9c4683d65ffa 100644 --- a/src/cmd/INIT/iffe.sh +++ b/src/cmd/INIT/iffe.sh @@ -33,7 +33,7 @@ esac set -o noglob command=iffe -version=2024-03-20 +version=2024-08-02 # DEFPATH should be inherited from package(1) case $DEFPATH in @@ -573,36 +573,7 @@ reallystatictest= regress= static=. statictest= -case $COTEMP in -"") case $HOSTNAME in - ""|?|??|???|????|????) - tmp=${HOSTNAME} - ;; - *) tmp=${HOSTNAME%${HOSTNAME#????}} - ;; - esac - tmp=${tmp}$$ - ;; -*) tmp=x${COTEMP} - ;; -esac -COTEMP=${tmp} -export COTEMP -case $tmp in -./*) ;; -??????????*) - tmp=${tmp%${tmp#?????????}} - ;; -?????????) - ;; -????????) - tmp=F$tmp - ;; -esac -case $tmp in -./*) ;; -*) tmp=./$tmp ;; -esac +tmp=./$command.$$ undef=0 verbose=0 vers=