comparison xml/en/docs/dev/development_guide.xml @ 1936:8f996938fe23

Style: proper quotes usage.
author Vladimir Homutov <vl@nginx.com>
date Thu, 16 Mar 2017 15:53:24 +0300
parents be7490a66d1b
children c1b0169e8f54
comparison
equal deleted inserted replaced
1935:be7490a66d1b 1936:8f996938fe23
788 788
789 /* add items to the list */ 789 /* add items to the list */
790 790
791 v = ngx_list_push(list); 791 v = ngx_list_push(list);
792 if (v == NULL) { /* error */ } 792 if (v == NULL) { /* error */ }
793 ngx_str_set(v, “foo”); 793 ngx_str_set(v, "foo");
794 794
795 v = ngx_list_push(list); 795 v = ngx_list_push(list);
796 if (v == NULL) { /* error */ } 796 if (v == NULL) { /* error */ }
797 ngx_str_set(v, “bar”); 797 ngx_str_set(v, "bar");
798 798
799 /* iterate over the list */ 799 /* iterate over the list */
800 800
801 part = &amp;list->part; 801 part = &amp;list->part;
802 v = part->elts; 802 v = part->elts;
912 912
913 ngx_queue_init(&amp;values); 913 ngx_queue_init(&amp;values);
914 914
915 f = ngx_palloc(pool, sizeof(ngx_foo_t)); 915 f = ngx_palloc(pool, sizeof(ngx_foo_t));
916 if (f == NULL) { /* error */ } 916 if (f == NULL) { /* error */ }
917 ngx_str_set(&amp;f->value, “foo”); 917 ngx_str_set(&amp;f->value, "foo");
918 918
919 ngx_queue_insert_tail(&amp;values, f); 919 ngx_queue_insert_tail(&amp;values, f);
920 920
921 /* insert more nodes here */ 921 /* insert more nodes here */
922 922
1365 pool = ngx_create_pool(1024, log); 1365 pool = ngx_create_pool(1024, log);
1366 if (pool == NULL) { /* error */ } 1366 if (pool == NULL) { /* error */ }
1367 1367
1368 s = ngx_palloc(pool, sizeof(ngx_str_t)); 1368 s = ngx_palloc(pool, sizeof(ngx_str_t));
1369 if (s == NULL) { /* error */ } 1369 if (s == NULL) { /* error */ }
1370 ngx_str_set(s, “foo”); 1370 ngx_str_set(s, "foo");
1371 1371
1372 p = ngx_pnalloc(pool, 3); 1372 p = ngx_pnalloc(pool, 3);
1373 if (p == NULL) { /* error */ } 1373 if (p == NULL) { /* error */ }
1374 ngx_memcpy(p, “foo”, 3); 1374 ngx_memcpy(p, "foo", 3);
1375 </programlisting> 1375 </programlisting>
1376 1376
1377 <para> 1377 <para>
1378 Since chain links <literal>ngx_chain_t</literal> are actively used in nginx, 1378 Since chain links <literal>ngx_chain_t</literal> are actively used in nginx,
1379 nginx pool provides a way to reuse them. 1379 nginx pool provides a way to reuse them.
1410 1410
1411 cln = ngx_pool_cleanup_add(pool, 0); 1411 cln = ngx_pool_cleanup_add(pool, 0);
1412 if (cln == NULL) { /* error */ } 1412 if (cln == NULL) { /* error */ }
1413 1413
1414 cln->handler = ngx_my_cleanup; 1414 cln->handler = ngx_my_cleanup;
1415 cln->data = “foo”; 1415 cln->data = "foo";
1416 1416
1417 ... 1417 ...
1418 1418
1419 static void 1419 static void
1420 ngx_my_cleanup(void *data) 1420 ngx_my_cleanup(void *data)
1819 <para> 1819 <para>
1820 A cycle is created by the function <literal>ngx_init_cycle()</literal>. 1820 A cycle is created by the function <literal>ngx_init_cycle()</literal>.
1821 The function receives the old cycle as the argument. 1821 The function receives the old cycle as the argument.
1822 It's used to locate the configuration file and inherit as much resources as 1822 It's used to locate the configuration file and inherit as much resources as
1823 possible from the old cycle to keep nginx running smoothly. 1823 possible from the old cycle to keep nginx running smoothly.
1824 When nginx starts, a fake cycle called "init cycle" is created and is then 1824 When nginx starts, a fake cycle called “init cycle” is created and is then
1825 replaced by a normal cycle, built from configuration. 1825 replaced by a normal cycle, built from configuration.
1826 </para> 1826 </para>
1827 1827
1828 <para> 1828 <para>
1829 Some members of the cycle: 1829 Some members of the cycle:
1901 <list type="bullet"> 1901 <list type="bullet">
1902 1902
1903 <listitem> 1903 <listitem>
1904 path loader — executed only once in 60 seconds after starting or reloading 1904 path loader — executed only once in 60 seconds after starting or reloading
1905 nginx. Normally, reads the directory and stores data in nginx shared 1905 nginx. Normally, reads the directory and stores data in nginx shared
1906 memory. The handler is called from a dedicated nginx process "nginx 1906 memory. The handler is called from a dedicated nginx process “nginx
1907 cache loader" 1907 cache loader”
1908 </listitem> 1908 </listitem>
1909 1909
1910 <listitem> 1910 <listitem>
1911 path manager — executed periodically. Normally, removes old files from the 1911 path manager — executed periodically. Normally, removes old files from the
1912 directory and reflects these changes in nginx memory. The handler is 1912 directory and reflects these changes in nginx memory. The handler is
1913 called from a dedicated nginx process "nginx cache manager" 1913 called from a dedicated nginx process “nginx cache manager”
1914 </listitem> 1914 </listitem>
1915 1915
1916 </list> 1916 </list>
1917 </listitem> 1917 </listitem>
1918 1918
2690 <para> 2690 <para>
2691 <literal>NGX_CHANGEBIN_SIGNAL</literal> (<literal>SIGUSR2</literal>) — change 2691 <literal>NGX_CHANGEBIN_SIGNAL</literal> (<literal>SIGUSR2</literal>) — change
2692 nginx binary. 2692 nginx binary.
2693 Master process starts a new nginx binary and passes there a list of all listen 2693 Master process starts a new nginx binary and passes there a list of all listen
2694 sockets. 2694 sockets.
2695 The list is passed in the environment variable <literal>"NGINX"</literal> in 2695 The list is passed in the environment variable <literal>“NGINX”</literal> in
2696 text format, where descriptor numbers separated with semicolons. 2696 text format, where descriptor numbers separated with semicolons.
2697 A new nginx instance reads that variable and adds the sockets to its init 2697 A new nginx instance reads that variable and adds the sockets to its init
2698 cycle. 2698 cycle.
2699 Other processes ignore this signal 2699 Other processes ignore this signal
2700 </para> 2700 </para>
3601 <literal>NGX_HTTP_GET, NGX_HTTP_HEAD, NGX_HTTP_POST</literal> etc 3601 <literal>NGX_HTTP_GET, NGX_HTTP_HEAD, NGX_HTTP_POST</literal> etc
3602 </listitem> 3602 </listitem>
3603 3603
3604 <listitem> 3604 <listitem>
3605 <literal>http_protocol, http_version, http_major, http_minor</literal> - 3605 <literal>http_protocol, http_version, http_major, http_minor</literal> -
3606 client HTTP protocol version in its original textual form ("HTTP/1.0", 3606 client HTTP protocol version in its original textual form (“HTTP/1.0”,
3607 "HTTP/1.1" etc), numeric form (<literal>NGX_HTTP_VERSION_10</literal>, 3607 “HTTP/1.1” etc), numeric form (<literal>NGX_HTTP_VERSION_10</literal>,
3608 <literal>NGX_HTTP_VERSION_11</literal> etc) and separate major and minor 3608 <literal>NGX_HTTP_VERSION_11</literal> etc) and separate major and minor
3609 versions 3609 versions
3610 </listitem> 3610 </listitem>
3611 3611
3612 <listitem> 3612 <listitem>