fixes/gcc120/vcs_diff_scripts.patch results

File details

./fixes/gcc120/vcs_diff_scripts.patch 2025-10-15-17:06

Used binaries

   

Binaries version

> uname -a
Linux cfarm120 5.14.0-427.31.1.el9_4.ppc64le #1 SMP Thu Aug 15 11:21:31 PDT 2024 ppc64le ppc64le ppc64le GNU/Linux

Full file content

 
diff --git a/scripts/nightly-testsuite/powerpc-linux/crontab.sh b/scripts/nightly-testsuite/powerpc-linux/crontab.sh
index 4ec9dc5..07a50a0 100755
--- a/scripts/nightly-testsuite/powerpc-linux/crontab.sh
+++ b/scripts/nightly-testsuite/powerpc-linux/crontab.sh
@@ -3,10 +3,17 @@
 
 GLOGFILE=$HOME/logs/crontab.sh.log
 PREVGLOGFILE=$HOME/logs/crontab.sh.log.prev
-GLOCKFILE=$HOME/logs/crontab.sh.lock
 PREVGLOCKFILE=$HOME/logs/crontab.sh.lock.prev
 CVS_LOGFILE=$HOME/logs/cvs_crontab.log
 
+FLOCK=`which flock`
+
+if [[ ( -e "$FLOCK" ) && ( -z "$GLOCKFILE" ) ]] ; then
+  export GLOCKFILE=$HOME/logs/crontab.sh.lock
+  $FLOCK --verbose -n $GLOCKFILE $0 "${@}"
+  return
+fi
+
 if [ -f "$GLOGFILE" ] ; then
   echo "$$: `date -u +%Y-%m-%d_%H:%M`: Starting $0 " "${@}" >> $GLOGFILE
 else