Skip to content
Snippets Groups Projects
  • Tom Lane's avatar
    8e6f6b8e
    Restore SIGFPE handler after initializing PL/Perl. · 8e6f6b8e
    Tom Lane authored
    Perl, for some unaccountable reason, believes it's a good idea to reset
    SIGFPE handling to SIG_IGN.  Which wouldn't be a good idea even if it
    worked; but on some platforms (Linux at least) it doesn't work at all,
    instead resulting in forced process termination if the signal occurs.
    Given the lack of other complaints, it seems safe to assume that Perl
    never actually provokes SIGFPE and so there is no value in the setting
    anyway.  Hence, reset it to our normal handler after initializing Perl.
    
    Report, analysis and patch by Andres Freund.
    8e6f6b8e
    History
    Restore SIGFPE handler after initializing PL/Perl.
    Tom Lane authored
    Perl, for some unaccountable reason, believes it's a good idea to reset
    SIGFPE handling to SIG_IGN.  Which wouldn't be a good idea even if it
    worked; but on some platforms (Linux at least) it doesn't work at all,
    instead resulting in forced process termination if the signal occurs.
    Given the lack of other complaints, it seems safe to assume that Perl
    never actually provokes SIGFPE and so there is no value in the setting
    anyway.  Hence, reset it to our normal handler after initializing Perl.
    
    Report, analysis and patch by Andres Freund.