From feb48f41afc70ec951068a30fb2887f1c3d1aa7c Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 29 Jun 2000 02:17:42 +0000 Subject: [PATCH] Add SIGFPE to list of signals never to block. #ifdef all signals in that list to cope with platforms that don't have them all. --- src/backend/libpq/pqsignal.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/src/backend/libpq/pqsignal.c b/src/backend/libpq/pqsignal.c index 4648fe455f..82cdf13c38 100644 --- a/src/backend/libpq/pqsignal.c +++ b/src/backend/libpq/pqsignal.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/libpq/pqsignal.c,v 1.16 2000/06/28 03:31:41 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/libpq/pqsignal.c,v 1.17 2000/06/29 02:17:42 tgl Exp $ * * NOTES * This shouldn't be in libpq, but the monitor and some other @@ -61,13 +61,35 @@ pqinitmask(void) #ifdef HAVE_SIGPROCMASK sigemptyset(&UnBlockSig); sigfillset(&BlockSig); + /* + * Unmark those signals that should never be blocked. + * Some of these signal names don't exist on all platforms. Most do, + * but might as well ifdef them all for consistency... + */ +#ifdef SIGTRAP + sigdelset(&BlockSig, SIGTRAP); +#endif +#ifdef SIGABRT sigdelset(&BlockSig, SIGABRT); +#endif +#ifdef SIGILL sigdelset(&BlockSig, SIGILL); +#endif +#ifdef SIGFPE + sigdelset(&BlockSig, SIGFPE); +#endif +#ifdef SIGSEGV sigdelset(&BlockSig, SIGSEGV); +#endif +#ifdef SIGBUS sigdelset(&BlockSig, SIGBUS); - sigdelset(&BlockSig, SIGTRAP); - sigdelset(&BlockSig, SIGCONT); +#endif +#ifdef SIGSYS sigdelset(&BlockSig, SIGSYS); +#endif +#ifdef SIGCONT + sigdelset(&BlockSig, SIGCONT); +#endif #else UnBlockSig = 0; BlockSig = sigmask(SIGHUP) | sigmask(SIGQUIT) | -- 2.40.0