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.

Now, I appreciate why this was done, it's just I'd rather take my chances on
killing a server process than having them all hanging around on Oracle
connections that just seem to completely freeze up. However, I admit that I
don't see an easy way round this-- the best I could come up with was macros
to mark operations being performed from XS that users might want to
interrupt with signals, but that are running outside Perl itself, and so
shouldn't leave the Perl state inconsistent. Afaict, it should be as safe to
execute a Perl SIGALRM handler in this context as it would be to execute a C
SIGALRM handler (i.e. not very safe, but usable). At a minimum, if I could
have the SIGALRM handler just do "kill(SIGINT,$$)", that would probably be
sufficient...

Hope that helps. I've been using Perl 5.8.0 with the Sybase, Oracle and Pg
drivers and this is the only really serious problem I have. In fact, using
5.8.0 instead of 5.6.1 did fix another signals problem with
mod_perl/mod_ssl, which is why we upgraded...

SRH
--
Steve Haslam, Developer for Activis; Integralis Ltd, Theale
http://www.activis.com/
W:+44-118-923-5272


-----Original Message-----
From: Tim Bunce [mailto:[EMAIL PROTECTED]
Sent: 25 February 2003 12:51
To: [EMAIL PROTECTED]
Cc: Jarkko Hietaniemi
Subject: Using perl 5.8.0?


Anyone using perl 5.8.0?

Jarkko and I would be interested in any feedback you may have.
Obviously my main interest is with DBI and drivers but Jarkko's
is wider.

Please reply to Jarkko (CC'd) and then also CC me if your reply
includes any feedback related to the DBI and/or the new signal
handling in perl 5.8.0.

Thanks.

Tim.

p.s. Jarkko, for those who don't know, maintains perl 5.8.0.


 


Please note that:
 
1. This e-mail may constitute privileged information. If you are not the intended 
recipient, you have received this confidential email and any attachments transmitted 
with it in error and you must not disclose, copy, circulate or in any other way use or 
rely on this information.
2. E-mails to and from the company are monitored for operational reasons and in 
accordance with lawful business practices.
3. The contents of this email are those of the individual and do not necessarily 
represent the views of the company.
4. The company does not conclude contracts by email and all negotiations are subject 
to contract.
5. The company accepts no responsibility once an e-mail and any attachments is sent.

http://www.activis.com




This annotation was added by the e-scan service.
http://www.activis.com
----------------------------------------------------------------------------------
This message has been checked for all known viruses by e:)scan.
For further information please contact [EMAIL PROTECTED]

Reply via email to