mirror of
https://github.com/espressif/openthread.git
synced 2026-08-30 22:09:54 +00:00
replace lockfile with mkdir (#406)
This commit is contained in:
committed by
Jonathan Hui
parent
926e44ff5c
commit
8897044464
@@ -54,10 +54,6 @@ cd /tmp || die
|
||||
[ $BUILD_TARGET != posix-32-bit ] || {
|
||||
sudo apt-get install g++-multilib || die
|
||||
}
|
||||
|
||||
[ $BUILD_TARGET != posix-distcheck ] || {
|
||||
sudo apt-get install procmail || die
|
||||
}
|
||||
}
|
||||
|
||||
[ $TRAVIS_OS_NAME != osx ] || {
|
||||
|
||||
+2
-3
@@ -108,8 +108,7 @@ trap "st=143; $do_exit" 15
|
||||
lock_path="/tmp/offset"
|
||||
OFFSET=0
|
||||
while true; do
|
||||
# using lockfile instead of mkdir since it's more portable
|
||||
lockfile -0 -r 0 "${lock_path}.${OFFSET}.lock.d" > /dev/null 2>&1
|
||||
mkdir "${lock_path}.${OFFSET}.lock.d" > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
break
|
||||
fi
|
||||
@@ -121,7 +120,7 @@ PORT_OFFSET=$OFFSET "$@" >$log_file 2>&1
|
||||
estatus=$?
|
||||
|
||||
# Return the offset
|
||||
rm -f "${lock_path}.${OFFSET}.lock.d"
|
||||
rm -rf "${lock_path}.${OFFSET}.lock.d"
|
||||
|
||||
if test $enable_hard_errors = no && test $estatus -eq 99; then
|
||||
tweaked_estatus=1
|
||||
|
||||
Reference in New Issue
Block a user