On Wed, Dec 15, 2010 at 3:32 AM, Branko Čibej <brane_at_apache.org> wrote:
> On 15.12.2010 06:17, Blair Zajac wrote:
>> On 12/14/10 8:21 PM, hwright_at_apache.org wrote:
>>> Author: hwright
>>> Date: Wed Dec 15 04:21:23 2010
>>> New Revision: 1049414
>>> URL: http://svn.apache.org/viewvc?rev=1049414&view=rev
>>> Allow tests which cause segfaults to not disrupt the other tests in
>>> the C
>>> testsuite. This becomes useful when committing an XFailing test of a
>>> segfault (which I will shortly do), or when a test starts segfaulting of
>>> it's own accord.
>>> This behavior is enabled by default, but can be disabled by passing
>>> --allow-segfaults to the test, which should make for better debugging
>>> of the cause of the segfault.
>>> This patch uses setjmp() / longjmp() to accomplish the recovery from
>>> a SIGSEGV.
>>> While I'd highly frown upon those function in general purpose use, I
>>> this is an understandable exception. Because it is so rare to use them,
>>> my personal experience is limited, so review and corrections are of
>> I've never seen setjmp/longjump used for this, but it's interesting.
>> One question, could you use sigsetjmp/siglongjmp instead of manually
>> putting back disposition the to default with apr_signal? I guess you
>> would use apr_signal after the sigsetjump in that case.
> Are the sig* variants available on all platforms? I don't recall seeing
> them in the C90 stdlib.
From my manpage:
The setjmp() and longjmp() functions conform to ISO/IEC 9899:1990
(``ISO C90''). The sigsetjmp() and siglongjmp() functions conform to
IEEE Std 1003.1-1988 (``POSIX.1'').
So it would appear that the sig* variants are not part of the C90 standard.
Received on 2010-12-15 14:16:04 CET