From 88970444649a61839211f8db7819bfd32bef84b5 Mon Sep 17 00:00:00 2001 From: Marcin K Szczodrak Date: Wed, 17 Aug 2016 12:39:06 -0700 Subject: [PATCH] replace lockfile with mkdir (#406) --- .travis/before_install.sh | 4 ---- third_party/openthread-test-driver/test-driver | 5 ++--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.travis/before_install.sh b/.travis/before_install.sh index 0580c1e9f..36f295d53 100755 --- a/.travis/before_install.sh +++ b/.travis/before_install.sh @@ -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 ] || { diff --git a/third_party/openthread-test-driver/test-driver b/third_party/openthread-test-driver/test-driver index 963155c47..e84c38de8 100755 --- a/third_party/openthread-test-driver/test-driver +++ b/third_party/openthread-test-driver/test-driver @@ -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