Skip to content

Commit 7c8bbe3

Browse files
committed
Add SIGFPE handler
1 parent b4ca5e8 commit 7c8bbe3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pg_backtrace.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ void _PG_init(void)
9898
{
9999
signal_handlers[SIGSEGV] = pqsignal(SIGSEGV, backtrace_handler);
100100
signal_handlers[SIGBUS] = pqsignal(SIGBUS, backtrace_handler);
101+
signal_handlers[SIGFPE] = pqsignal(SIGFPE, backtrace_handler);
101102
signal_handlers[SIGINT] = pqsignal(SIGINT, backtrace_handler);
102103
prev_executor_run_hook = ExecutorRun_hook;
103104
ExecutorRun_hook = backtrace_executor_run_hook;
@@ -116,6 +117,7 @@ void _PG_fini(void)
116117
ExecutorRun_hook = prev_executor_run_hook;
117118
pqsignal(SIGSEGV, signal_handlers[SIGSEGV]);
118119
pqsignal(SIGBUS, signal_handlers[SIGBUS]);
120+
pqsignal(SIGFPE, signal_handlers[SIGFPE]);
119121
pqsignal(SIGINT, signal_handlers[SIGINT]);
120122
}
121123

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy