Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Signal::StackTrace not working?by Athanasius (Archbishop) |
on Oct 12, 2014 at 03:13 UTC ( [id://1103535]=note: print w/replies, xml ) | Need Help?? |
Hello perlancar, I’m seeing the same behaviour on Windows. I think the problem is that the trace is given from the vantage point of the statement immediately following the statement that was in effect when the signal was received. I played around with the following script:
Output:
Note the line number: line 13 is the print statement following sleep. And with that print statement commented out:
The INT signal is now reported as having been received after sub g returned, because sleep happened to be the last statement in the sub. And the stack trace shown is correct as from the viewpoint of line 7. This looks like a fairly serious bug to me. Hope that helps,
In Section
Seekers of Perl Wisdom
|
|