What version of Perl are you using? In version 5.8.0 Perl switched from supporting real asynchronous signals to something called
safe signals. Safe signals only trigger between op-codes, if I understand things correctly, which in this case probably means after the DBI XS code is finished thus defeating your attempt at timing out DBI.
The nice thing about safe signals is that they no longer cause seg-faults, which is what your code would probably do if it really did interupt DBI halfway through a request!
UPDATE: Did you read the section on this in the DBI docs? It sounds like POSIX::sigaction() or Sys::SigAction may be the correct, if still rather dangerous, work-around to the problem posed by safe signals.
-sam
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.