精通
英语
和
开源
,
擅长
开发
与
培训
,
胸怀四海
第一信赖
锐英源精品开源心得,转载请注明:“锐英源www.wisestudy.cn,孙老师作品,电话13803810136。需要全文内容也请联系孙老师。
PerlFreshRestart affects the graceful restart process for non-DSO mod_perl builds. If you have mod_perl enabled Apache built as DSO and you restart it, the whole Perl interpreter is completely torn down (perl_destruct())and restarted. The value of PerlFreshRestart is irrelevant at this point.
PerlFreshRestart影响以non-DSO mod_perl编译生成的系统的优雅的重启过程。如果你的mod_perl启用Apache的构建为DSO,你重新启动它,整个Perl解释器是完全被析构(perl_destruct())并重新启动。PerlFreshRestart的值此时是不相关的。
Unfortunately, not all perl modules are robust enough to survive reload. For them this is an unusual situation. PerlFreshRestart does not much more than:
不幸的是,并不是所有perl模块都足够强大,足以应对重新加载。对他们来说这是一个不寻常的情况。PerlFreshRestart远不止这些:
while (my ($k,$v) = each %INC) {
delete $INC{$k};
require $k;
}
Besides that, it flushes the Apache::Registry cache, and empties any dynamic stacked handlers (e.g. PerlChildInitHandler). 此外,它刷新了Apache::Registry高速缓存,并清空任何动态堆放处理程序(如。PerlChildInitHandler)。
Some users, who had turned PerlFreshRestart On, reported having segfaults, others have seen no problems starting the server, no errors written to the logs, but no server running after a restart. Most of the problems have gone away when it was turned Off. 一些已经被转换成PerlFreshRestart的用户,报告有段错误,其他服务器启动没有问题,没有错误写入日志,但重启后没有服务器运行。当它被关闭时大部分的问题已经消失。
It doesn’t mean that you shouldn’t use it, if it works for you. Just beware of the dragons... 这并不意味着你不能使用它,如果它能工作,只要提防报错就行……
That’s a mandatory warning inside Perl which happens only if you modify your script and Apache::Registry reloads it. Perl is warning you that the subroutine(s) were redefined. It is mostly harmless. If you don’t like seeing these warnings, just kill -USR1 (graceful restart) Apache when you modify your scripts.
这是一个在Perl中只要在你修改你的脚本并且Apache::Registry重新加载它的时候发生的强制性的警告。Perl警告你,子程序(s)被重新定义。它主要是无害的。如果你不喜欢看到这些警告,只要在你修改脚本时kill -USR1(重新启动)Apache。
You aren’t supposed to see these warnings if you don’t modify the code with perl 5.004_05 or 5.005+.and higher. If you still experience a problem with code within a CGI script, moving all the code into a module (or a library) and require()ing it should solve the problem.
如果你不用perl 5.004 _05或5.005 +,或者更高的版本修改代码你不会看到这些警告。如果你还是觉得在CGI中脚本代码有问题,将所有的代码移动到一个模块(或库)并且require()ing就会解决这个问题。