[Groonga-commit] groonga/groonga at 678d875 [master] groonga-httpd-restart: fix signal send timing

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Aug 22 17:50:26 JST 2013


Kouhei Sutou	2013-08-22 17:50:26 +0900 (Thu, 22 Aug 2013)

  New Revision: 678d875a1de3dfe9974334424732cadf20542024
  https://github.com/groonga/groonga/commit/678d875a1de3dfe9974334424732cadf20542024

  Message:
    groonga-httpd-restart: fix signal send timing
    
    PID list of workers should be collected before worker stop signals.
    All workers may be stopped between "kill" and "pgrep".

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

  Modified: data/scripts/groonga-httpd-restart (+1 -2)
===================================================================
--- data/scripts/groonga-httpd-restart    2013-08-22 17:49:04 +0900 (ba92bf3)
+++ data/scripts/groonga-httpd-restart    2013-08-22 17:50:26 +0900 (4821f3c)
@@ -71,11 +71,10 @@ if ! wait_until [ -f ${OLD_PID_FILE} ]; then
     exit 1
 fi
 
-switch_worker ${OLD_PID}
-
 NEW_PID=$(cat ${PID_FILE})
 
 OLD_WORKER_PROCESSES=$(pgrep -P ${OLD_PID} | grep -v ${NEW_PID})
+switch_worker ${OLD_PID}
 for pid in ${OLD_WORKER_PROCESSES}; do
     wait_until ps --pid=${pid} > /dev/null
 done
-------------- next part --------------
HTML����������������������������...
다운로드 



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