Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Commit

Permalink
Merge "[services-ng] validate whether warden server is ready by check…
Browse files Browse the repository at this point in the history
…ing /proc/$pid"
  • Loading branch information
SlimYang authored and Gerrit Code Review committed Jan 15, 2013
2 parents 39e93ce + cef5825 commit 5936c3f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/common/services/utils.sh
Expand Up @@ -55,13 +55,14 @@ start_warden() {

for i in `seq 1 $countdown`; do
warden_pid=`sudo netstat -pan | grep LISTENING | grep /tmp/warden\.sock | awk '{print $9}' | cut -d / -f 1`
if [ -z $warden_pid ]; then
sleep 0.5
echo -n .
else
if [ ! -z $warden_pid ] && [ -e /proc/$warden_pid ]
then
warden_start_flag=true
echo "warden is ready"
break
else
sleep 0.5
echo -n .
fi
done

Expand Down

0 comments on commit 5936c3f

Please sign in to comment.