This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author schmir
Recipients gvanrossum, schmir, tebeka
Date 2008-01-12.22:25:37
SpamBayes Score 0.0697817
Marked as misclassified No
Message-id <1200176738.83.0.87840083912.issue1215@psf.upfronthosting.co.za>
In-reply-to
Content
If you replace your call segfault.segfault() with os.kill(os.getpid(),
signal.SIGSEGV) everything works as expected. The problem is that the
signal is just caught in the c handler (and a flag is set) and then the
program continues with the offending *c = 'a'; statement, which again
ends with a SIGSEGV and the handler being called.
The documentation explicitly states "Because the C signal handler always
returns, it makes little sense to catch synchronous errors like SIGFPE
or SIGSEGV."
I think raising that InvalidArgument exception is most probably the
right thing to do (or at least printing a warning). Those that really
want to handle SIGSEGV should do it from C anyway.
History
Date User Action Args
2008-01-12 22:25:39schmirsetspambayes_score: 0.0697817 -> 0.0697817
recipients: + schmir, gvanrossum, tebeka
2008-01-12 22:25:38schmirsetspambayes_score: 0.0697817 -> 0.0697817
messageid: <1200176738.83.0.87840083912.issue1215@psf.upfronthosting.co.za>
2008-01-12 22:25:37schmirlinkissue1215 messages
2008-01-12 22:25:37schmircreate