Skip to content

Commit

Permalink
build: iffe: fix parallel tmp file handling (re: ced499a)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
McDutchie committed Aug 1, 2024
1 parent ced499a commit 616bc8d
Showing 1 changed file with 2 additions and 31 deletions.
33 changes: 2 additions & 31 deletions src/cmd/INIT/iffe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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=
Expand Down

0 comments on commit 616bc8d

Please sign in to comment.