Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/freebsd/poudriere.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/share
diff options
context:
space:
mode:
authorBryan Drewery <bryan@shatow.net>2021-11-20 05:26:49 +0300
committerBryan Drewery <bryan@shatow.net>2021-11-20 05:26:49 +0300
commit023730307e6e7e0878fd25665a950007b07d7bfd (patch)
tree5e2cc2ac5d3bd3dd04fdff3711e7b3a4ae88e8b5 /src/share
parent04719b571fe147bf1a4b26faa27a89bf549e2fa0 (diff)
cd: Need a critical section here.
If a SIGINT comes in while updating the relpaths it is possible to end up in cleanup traps where the values do not match $PWD.
Diffstat (limited to 'src/share')
-rwxr-xr-xsrc/share/poudriere/common.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/share/poudriere/common.sh b/src/share/poudriere/common.sh
index ec20e80e..517c3c11 100755
--- a/src/share/poudriere/common.sh
+++ b/src/share/poudriere/common.sh
@@ -1864,11 +1864,13 @@ cd() {
local ret
ret=0
+ critical_start
command cd "$@" || ret=$?
# Handle fixing relative paths
if [ "${OLDPWD}" != "${PWD}" ]; then
_update_relpaths "${OLDPWD}" "${PWD}" || :
fi
+ critical_end
return ${ret}
}