[Groonga-commit] groonga/groonga at 44dbff4 [master] groonga-httpd-restart: implement timeout count down by seq

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Aug 22 18:17:11 JST 2013


Kouhei Sutou	2013-08-22 18:17:11 +0900 (Thu, 22 Aug 2013)

  New Revision: 44dbff488333f426cd986bc29de803b166926a87
  https://github.com/groonga/groonga/commit/44dbff488333f426cd986bc29de803b166926a87

  Message:
    groonga-httpd-restart: implement timeout count down by seq
    
    Because it is more simpler.

  Modified files:
    data/scripts/groonga-httpd-restart

  Modified: data/scripts/groonga-httpd-restart (+2 -5)
===================================================================
--- data/scripts/groonga-httpd-restart    2013-08-22 18:05:01 +0900 (3d71cb3)
+++ data/scripts/groonga-httpd-restart    2013-08-22 18:17:11 +0900 (4cb32f1)
@@ -31,14 +31,11 @@ elif [ -f /etc/sysconfig/${SERVICE_NAME} ]; then
 fi
 
 wait_until () {
-    local rest=${TIMEOUT}
-    local duration=1
-    while [ ${rest} -ge 0 ]; do
+    for n in $(seq ${TIMEOUT}); do
         if "$@"; then
             return 0
         fi
-        rest=$((${rest} - ${duration}))
-        sleep ${duration}
+        sleep 1
     done
     return 1
 }
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index