diff --git a/bin/start.sh b/bin/start.sh
index edf28189347396dc4d37a97938afff9975dabc8b..e104738fdaf71a57d096c49b47169bad5b8961f3 100755
--- a/bin/start.sh
+++ b/bin/start.sh
@@ -57,8 +57,8 @@ fi
 
 # Start the node.
 (
-    echo ${BASHPID} > ${BFANODEDIR}/start-loop.pid
     flock --nonblock --exclusive 9 || exit 1
+    echo ${BASHPID} > ${BFANODEDIR}/start-loop.pid
     while :
     do
         echo