# HG changeset patch # User Ruslan Ermilov # Date 1360568688 -14400 # Node ID 6678b1f27514cb6766e072be4d14b095946d888e # Parent f563967a4f5978a01a0de0327df229f2811464a2 Improved readability of "Upgrading Executable on the Fly". The old text about what to do if the new executable fails to work properly caused confusion. diff --git a/xml/en/docs/control.xml b/xml/en/docs/control.xml --- a/xml/en/docs/control.xml +++ b/xml/en/docs/control.xml @@ -8,7 +8,7 @@
+ rev="2">
@@ -212,35 +212,29 @@ 36267 36264 nobody 0.0 1364 kqread ng It should be noted that the old master process does not close its listen sockets, and it can be managed to start its worker processes again if needed. -If for some reason the new executable file works unacceptably, the following -can be done: +If for some reason the new executable file works unacceptably, one of the +following can be done: Send the HUP signal to the old master process. -The old process will start new worker processes without re-reading the -configuration. -After that, new processes can be shut down gracefully, by sending -their master process the QUIT signal. +The old master process will start new worker processes +without re-reading the configuration. +After that, all new processes can be shut down gracefully, +by sending the QUIT signal to the old master process. -Send the TERM signal to the new master process, it will then send a -message to its worker processes requesting them to exit immediately, -and they will all exit almost immediately. +Send the TERM signal to the new master process. +It will then send a message to its worker processes requesting them +to exit immediately, and they will all exit almost immediately. +If the new worker processes do not exit for some reason, +the KILL signal should be sent to them. When the new master process exits, the old master process will start new -worker processes. - - - - - -If new processes do not exit, the KILL signal should be sent to them. -When the new master process exits, the old master process will start new -worker processes. +worker processes automatically. @@ -254,7 +248,7 @@ the .oldbin suffix from the -If upgrade was successful, then the old master process can be sent +If upgrade was successful, then the old master process should be sent the QUIT signal, and only new processes will stay: PID PPID USER %CPU VSZ WCHAN COMMAND diff --git a/xml/ru/docs/control.xml b/xml/ru/docs/control.xml --- a/xml/ru/docs/control.xml +++ b/xml/ru/docs/control.xml @@ -8,7 +8,7 @@
+ rev="2">
@@ -204,29 +204,28 @@ 36267 36264 nobody 0.0 1364 kqread ng Нужно заметить, что старый процесс не закрывает свои listen сокеты и при необходимости ему можно сказать, чтобы он снова запустил свои рабочие процессы. Если работа нового исполняемого файла по каким-то причинам не устраивает, -то можно сделать следующее: +можно проделать одно из следующих действий: -Послать старому главному процессу сигнал HUP. Старый процесс, не перечитывая -конфигурации, запустит новые рабочие процессы. После этого можно -плавно завершить новые процессы, послав их главному процессу QUIT. +Послать старому главному процессу сигнал HUP. +Старый главный процесс, не перечитывая конфигурации, +запустит новые рабочие процессы. +После этого можно плавно завершить все новые процессы, +послав старому главному процессу сигнал QUIT. -Послать новому главному процессу сигнал TERM, он пошлёт сообщение о -немедленном выходе рабочим процессам и все они практически сразу же завершатся. -По выходу нового главного процесса старый запустит новые рабочие процессы. - - - - - -Если же новые процессы не завершаются, то нужно послать им сигнал KILL. -По выходу нового главного процесса старый запустит свои рабочие процессы. +Послать новому главному процессу сигнал TERM. +В ответ на это он пошлёт сообщение о немедленном выходе своим +рабочим процессам, и все они практически сразу же завершатся. +Если новые рабочие процессы по каким-то причинам не завершаются, +нужно послать им сигнал KILL. +По завершению нового главного процесса старый главный процесс +автоматически запустит новые рабочие процессы. @@ -235,13 +234,13 @@ 36267 36264 nobody 0.0 1364 kqread ng -Если новый главный процесс выходит, то старый процесс убирает +Если новый главный процесс выходит, то старый главный процесс убирает суффикс .oldbin из имени файла с номером процесса. Если же обновление прошло удачно, то старому процессу нужно послать сигнал -QUIT, и у нас остаются только новые процессы: +QUIT, и останутся только новые процессы: PID PPID USER %CPU VSZ WCHAN COMMAND 36264 1 root 0.0 1148 pause nginx: master process /usr/local/nginx/sb