Mercurial > hg > nginx-vendor-0-7
comparison src/http/modules/perl/ngx_http_perl_module.c @ 314:d5ec0be9c835 NGINX_0_6_1
nginx 0.6.1
*) Bugfix: in SSI parsing.
*) Bugfix: if remote SSI subrequest was used, then posterior local file
subrequest might transferred to client in wrong order.
*) Bugfix: large SSI inclusions buffered in temporary files were
truncated.
*) Bugfix: the perl $$ variable value in ngx_http_perl_module was equal
to the master process identification number.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Sun, 17 Jun 2007 00:00:00 +0400 |
parents | 55328d69b335 |
children | f7cd062ee035 |
comparison
equal
deleted
inserted
replaced
313:a42b0aafacc1 | 314:d5ec0be9c835 |
---|---|
65 | 65 |
66 #if (NGX_HAVE_PERL_MULTIPLICITY) | 66 #if (NGX_HAVE_PERL_MULTIPLICITY) |
67 static void ngx_http_perl_cleanup_perl(void *data); | 67 static void ngx_http_perl_cleanup_perl(void *data); |
68 #endif | 68 #endif |
69 | 69 |
70 static ngx_int_t ngx_http_perl_init_worker(ngx_cycle_t *cycle); | |
70 static void ngx_http_perl_exit(ngx_cycle_t *cycle); | 71 static void ngx_http_perl_exit(ngx_cycle_t *cycle); |
71 | 72 |
72 | 73 |
73 static ngx_command_t ngx_http_perl_commands[] = { | 74 static ngx_command_t ngx_http_perl_commands[] = { |
74 | 75 |
124 &ngx_http_perl_module_ctx, /* module context */ | 125 &ngx_http_perl_module_ctx, /* module context */ |
125 ngx_http_perl_commands, /* module directives */ | 126 ngx_http_perl_commands, /* module directives */ |
126 NGX_HTTP_MODULE, /* module type */ | 127 NGX_HTTP_MODULE, /* module type */ |
127 NULL, /* init master */ | 128 NULL, /* init master */ |
128 NULL, /* init module */ | 129 NULL, /* init module */ |
129 NULL, /* init process */ | 130 ngx_http_perl_init_worker, /* init process */ |
130 NULL, /* init thread */ | 131 NULL, /* init thread */ |
131 NULL, /* exit thread */ | 132 NULL, /* exit thread */ |
132 NULL, /* exit process */ | 133 NULL, /* exit process */ |
133 ngx_http_perl_exit, /* exit master */ | 134 ngx_http_perl_exit, /* exit master */ |
134 NGX_MODULE_V1_PADDING | 135 NGX_MODULE_V1_PADDING |
1002 | 1003 |
1003 return NGX_CONF_OK; | 1004 return NGX_CONF_OK; |
1004 } | 1005 } |
1005 | 1006 |
1006 | 1007 |
1008 static ngx_int_t | |
1009 ngx_http_perl_init_worker(ngx_cycle_t *cycle) | |
1010 { | |
1011 ngx_http_perl_main_conf_t *pmcf; | |
1012 | |
1013 pmcf = ngx_http_cycle_get_module_main_conf(cycle, ngx_http_perl_module); | |
1014 | |
1015 { | |
1016 | |
1017 dTHXa(pmcf->perl); | |
1018 PERL_SET_CONTEXT(pmcf->perl); | |
1019 | |
1020 /* set worker's $$ */ | |
1021 | |
1022 sv_setiv(GvSV(gv_fetchpv("$", TRUE, SVt_PV)), (I32) ngx_pid); | |
1023 | |
1024 } | |
1025 | |
1026 return NGX_OK; | |
1027 } | |
1028 | |
1007 static void | 1029 static void |
1008 ngx_http_perl_exit(ngx_cycle_t *cycle) | 1030 ngx_http_perl_exit(ngx_cycle_t *cycle) |
1009 { | 1031 { |
1010 PERL_SYS_TERM(); | 1032 PERL_SYS_TERM(); |
1011 } | 1033 } |