On Tue, Feb 25, 2003 at 01:26:03PM -0000, Steve Haslam wrote:
> Tim, Jarkko; my main problem with using perl 5.8 for our
> DBD::Oracle/DBD::Sybase apps is the inability to use signals to "time out"
> an operation. We have constructs like:
>
> eval {
> alarm(60);
> local $SIG{ALRM} = sub { $sth->cancel(); die "timeout" };
> $sth->execute();
> alarm(0);
> };
> if ($@ =~ /timeout/) {
> # ...
> }
>
> This works in 5.6.1, but not 5.8.0-- presumably because in 5.8.0, the signal
> handling just never runs the Perl handler until the execute() method returns
> to a safe point.
Funny you should mention that, as it's one of the issues that
prompted me to ask for feedback. Jarkko has been working on a way
to reenable the old signal handling:
See related threads here
http://archive.develooper.com/perl5-porters%40perl.org/
and the most recent patch here
http://archive.develooper.com/perl5-porters%40perl.org/msg92471.html
Tim.