Skip to content

Commit feb48f4

Browse files
committed
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.
1 parent 932d1e5 commit feb48f4

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

src/backend/libpq/pqsignal.c

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/libpq/pqsignal.c,v 1.16 2000/06/28 03:31:41 tgl Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/libpq/pqsignal.c,v 1.17 2000/06/29 02:17:42 tgl Exp $
1313
*
1414
* NOTES
1515
* This shouldn't be in libpq, but the monitor and some other
@@ -61,13 +61,35 @@ pqinitmask(void)
6161
#ifdef HAVE_SIGPROCMASK
6262
sigemptyset(&UnBlockSig);
6363
sigfillset(&BlockSig);
64+
/*
65+
* Unmark those signals that should never be blocked.
66+
* Some of these signal names don't exist on all platforms. Most do,
67+
* but might as well ifdef them all for consistency...
68+
*/
69+
#ifdef SIGTRAP
70+
sigdelset(&BlockSig, SIGTRAP);
71+
#endif
72+
#ifdef SIGABRT
6473
sigdelset(&BlockSig, SIGABRT);
74+
#endif
75+
#ifdef SIGILL
6576
sigdelset(&BlockSig, SIGILL);
77+
#endif
78+
#ifdef SIGFPE
79+
sigdelset(&BlockSig, SIGFPE);
80+
#endif
81+
#ifdef SIGSEGV
6682
sigdelset(&BlockSig, SIGSEGV);
83+
#endif
84+
#ifdef SIGBUS
6785
sigdelset(&BlockSig, SIGBUS);
68-
sigdelset(&BlockSig, SIGTRAP);
69-
sigdelset(&BlockSig, SIGCONT);
86+
#endif
87+
#ifdef SIGSYS
7088
sigdelset(&BlockSig, SIGSYS);
89+
#endif
90+
#ifdef SIGCONT
91+
sigdelset(&BlockSig, SIGCONT);
92+
#endif
7193
#else
7294
UnBlockSig = 0;
7395
BlockSig = sigmask(SIGHUP) | sigmask(SIGQUIT) |

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