# HG changeset patch # User Yaroslav Zhuravlev # Date 1562174209 -10800 # Node ID dbf68c94952212ac3efb379f326a5dfa712cd1b1 # Parent 65961cddec7c7a00015239366767f8f50d8f98db Documented the "process" global object. diff -r 65961cddec7c -r dbf68c949522 xml/en/docs/njs/changes.xml --- a/xml/en/docs/njs/changes.xml Fri Jun 28 07:48:34 2019 +0000 +++ b/xml/en/docs/njs/changes.xml Wed Jul 03 20:16:49 2019 +0300 @@ -9,7 +9,7 @@
@@ -72,7 +72,9 @@ Feature: -added “process” global object. +added +process +global object. diff -r 65961cddec7c -r dbf68c949522 xml/en/docs/njs/compatibility.xml --- a/xml/en/docs/njs/compatibility.xml Fri Jun 28 07:48:34 2019 +0000 +++ b/xml/en/docs/njs/compatibility.xml Wed Jul 03 20:16:49 2019 +0300 @@ -9,7 +9,7 @@
@@ -515,6 +515,19 @@ (0.3.2) + +Global objects +(0.3.3): + + + +process + + + + + + diff -r 65961cddec7c -r dbf68c949522 xml/en/docs/njs/reference.xml --- a/xml/en/docs/njs/reference.xml Fri Jun 28 07:48:34 2019 +0000 +++ b/xml/en/docs/njs/reference.xml Wed Jul 03 20:16:49 2019 +0300 @@ -9,7 +9,7 @@
+ rev="29">
@@ -371,6 +371,56 @@
+
+ + +
+ + +The process object is a global object +that provides information about the current process +(0.3.3). + + + + + + +process.argv + +Returns an array that contains the command line arguments +passed when the current process was launched. + + +process.env + +Returns an object containing the user environment. + +By default, nginx removes all environment variables inherited +from its parent process except the TZ variable. +Use the directive +to preserve some of the inherited variables. + + + +process.pid + +Returns the PID of the current process. + + +process.ppid + +Returns the PID of the current parent process. + + + + + +
+ +
+ +
diff -r 65961cddec7c -r dbf68c949522 xml/index.xml --- a/xml/index.xml Fri Jun 28 07:48:34 2019 +0000 +++ b/xml/index.xml Wed Jul 03 20:16:49 2019 +0300 @@ -17,7 +17,9 @@ njs-0.3.3 -version has been released, featuring “process” global object +version has been released, featuring +process +global object and more. diff -r 65961cddec7c -r dbf68c949522 xml/ru/docs/njs/compatibility.xml --- a/xml/ru/docs/njs/compatibility.xml Fri Jun 28 07:48:34 2019 +0000 +++ b/xml/ru/docs/njs/compatibility.xml Wed Jul 03 20:16:49 2019 +0300 @@ -9,7 +9,7 @@
@@ -494,6 +494,19 @@ (0.3.2) + +Глобальные объекты +(0.3.3): + + + +process + + + + + + diff -r 65961cddec7c -r dbf68c949522 xml/ru/docs/njs/reference.xml --- a/xml/ru/docs/njs/reference.xml Fri Jun 28 07:48:34 2019 +0000 +++ b/xml/ru/docs/njs/reference.xml Wed Jul 03 20:16:49 2019 +0300 @@ -384,6 +384,56 @@
+
+ + +
+ + +Объект process является глобальным объектом, +предоставляющим информацию о текущем процессе +(0.3.3). + + + + + + +process.argv + +Возвращает массив, содержащий аргументы командной строки, +передаваемые в момент запуска текущего процесса. + + +process.env + +Возвращает объект, содержащий переменные окружения пользователя. + +По умолчанию nginx удаляет все переменные окружения, унаследованные +от своего родительского процесса, кроме переменной TZ. +Для сохранения части унаследованных переменных +необходимо использовать директиву . + + + +process.pid + +Возвращает PID текущего процесса. + + +process.ppid + +Возвращает PID текущего родительского процесса. + + + + + +
+ +
+ +