[Moscow.pm] perldoc -f alarm vs CGI-cкрипты
Dmitry E. Oboukhov
unera на debian.org
Вт Окт 28 01:59:08 PDT 2008
никто не знает как можно научить работать alarm в CGI-скриптах?
приведенный ниже тест почему-то всегда достигает до die "end"
хотя если его пустить в консоли он всегда выпадает на die "test"
$ perl -v
This is perl, v5.10.0 built for i486-linux-gnu-thread-multi
Copyright 1987-2007, Larry Wall
Perl may be copied only under the terms of either the Artistic License
or the GNU General Public License, which may be found in the Perl 5
source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to
the Internet, point your browser at http://www.perl.org/, the Perl Home
Page.
скрипт:
#!/usr/bin/perl
use warnings;
use strict;
use utf8;
use open qw(:std :utf8);
use CGI::Carp qw(fatalsToBrowser);
alarm 1;
$SIG{ALRM}=sub { die "test" };
sleep 2;
die "end";
----------- следущая часть -----------
A non-text attachment was scrubbed...
Name: отсутствует
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://mail.pm.org/pipermail/moscow-pm/attachments/20081028/09442431/attachment.bin>
Подробная информация о списке рассылки Moscow-pm