Mercurial > hg > nginx-mail
comparison src/http/modules/perl/ngx_http_perl_module.c @ 306:55328d69b335 NGINX_0_5_23
nginx 0.5.23
*) Feature: the ngx_http_ssl_module supports Server Name Indication TLS
extension.
*) Feature: the "fastcgi_catch_stderr" directive.
Thanks to Nick S. Grechukh, OWOX project.
*) Bugfix: a segmentation fault occurred in master process if two
virtual servers should bind() to the overlapping ports.
*) Bugfix: if nginx was built with ngx_http_perl_module and perl
supported threads, then during second reconfiguration the error
messages "panic: MUTEX_LOCK" and "perl_parse() failed" were issued.
*) Bugfix: in the HTTPS protocol in the "proxy_pass" directive.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 04 Jun 2007 00:00:00 +0400 |
parents | 2ceaee987f37 |
children | d5ec0be9c835 |
comparison
equal
deleted
inserted
replaced
305:892db29abb4f | 306:55328d69b335 |
---|---|
64 static char *ngx_http_perl_set(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); | 64 static char *ngx_http_perl_set(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); |
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 | |
70 static void ngx_http_perl_exit(ngx_cycle_t *cycle); | |
69 | 71 |
70 | 72 |
71 static ngx_command_t ngx_http_perl_commands[] = { | 73 static ngx_command_t ngx_http_perl_commands[] = { |
72 | 74 |
73 { ngx_string("perl_modules"), | 75 { ngx_string("perl_modules"), |
126 NULL, /* init module */ | 128 NULL, /* init module */ |
127 NULL, /* init process */ | 129 NULL, /* init process */ |
128 NULL, /* init thread */ | 130 NULL, /* init thread */ |
129 NULL, /* exit thread */ | 131 NULL, /* exit thread */ |
130 NULL, /* exit process */ | 132 NULL, /* exit process */ |
131 NULL, /* exit master */ | 133 ngx_http_perl_exit, /* exit master */ |
132 NGX_MODULE_V1_PADDING | 134 NGX_MODULE_V1_PADDING |
133 }; | 135 }; |
134 | 136 |
135 | 137 |
136 #if (NGX_HTTP_SSI) | 138 #if (NGX_HTTP_SSI) |
476 return NGX_CONF_OK; | 478 return NGX_CONF_OK; |
477 } | 479 } |
478 | 480 |
479 #endif | 481 #endif |
480 | 482 |
481 PERL_SYS_INIT(&ngx_argc, &ngx_argv); | 483 if (nginx_stash == NULL) { |
484 PERL_SYS_INIT(&ngx_argc, &ngx_argv); | |
485 } | |
482 | 486 |
483 pmcf->perl = ngx_http_perl_create_interpreter(cf, pmcf); | 487 pmcf->perl = ngx_http_perl_create_interpreter(cf, pmcf); |
484 | 488 |
485 if (pmcf->perl == NULL) { | 489 if (pmcf->perl == NULL) { |
486 PERL_SYS_TERM(); | |
487 return NGX_CONF_ERROR; | 490 return NGX_CONF_ERROR; |
488 } | 491 } |
489 | 492 |
490 pmcf->nginx = nginx_stash; | 493 pmcf->nginx = nginx_stash; |
491 | 494 |
786 PERL_SET_CONTEXT(perl); | 789 PERL_SET_CONTEXT(perl); |
787 | 790 |
788 (void) perl_destruct(perl); | 791 (void) perl_destruct(perl); |
789 | 792 |
790 perl_free(perl); | 793 perl_free(perl); |
791 | |
792 PERL_SYS_TERM(); | |
793 } | 794 } |
794 | 795 |
795 #endif | 796 #endif |
796 | 797 |
797 | 798 |
999 v->get_handler = ngx_http_perl_variable; | 1000 v->get_handler = ngx_http_perl_variable; |
1000 v->data = (uintptr_t) pv; | 1001 v->data = (uintptr_t) pv; |
1001 | 1002 |
1002 return NGX_CONF_OK; | 1003 return NGX_CONF_OK; |
1003 } | 1004 } |
1005 | |
1006 | |
1007 static void | |
1008 ngx_http_perl_exit(ngx_cycle_t *cycle) | |
1009 { | |
1010 PERL_SYS_TERM(); | |
1011 } |