Commit feb48f41 authored by Tom Lane's avatar Tom Lane

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.
parent 932d1e5f
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * 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 * NOTES
* This shouldn't be in libpq, but the monitor and some other * This shouldn't be in libpq, but the monitor and some other
...@@ -61,13 +61,35 @@ pqinitmask(void) ...@@ -61,13 +61,35 @@ pqinitmask(void)
#ifdef HAVE_SIGPROCMASK #ifdef HAVE_SIGPROCMASK
sigemptyset(&UnBlockSig); sigemptyset(&UnBlockSig);
sigfillset(&BlockSig); 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); sigdelset(&BlockSig, SIGABRT);
#endif
#ifdef SIGILL
sigdelset(&BlockSig, SIGILL); sigdelset(&BlockSig, SIGILL);
#endif
#ifdef SIGFPE
sigdelset(&BlockSig, SIGFPE);
#endif
#ifdef SIGSEGV
sigdelset(&BlockSig, SIGSEGV); sigdelset(&BlockSig, SIGSEGV);
#endif
#ifdef SIGBUS
sigdelset(&BlockSig, SIGBUS); sigdelset(&BlockSig, SIGBUS);
sigdelset(&BlockSig, SIGTRAP); #endif
sigdelset(&BlockSig, SIGCONT); #ifdef SIGSYS
sigdelset(&BlockSig, SIGSYS); sigdelset(&BlockSig, SIGSYS);
#endif
#ifdef SIGCONT
sigdelset(&BlockSig, SIGCONT);
#endif
#else #else
UnBlockSig = 0; UnBlockSig = 0;
BlockSig = sigmask(SIGHUP) | sigmask(SIGQUIT) | BlockSig = sigmask(SIGHUP) | sigmask(SIGQUIT) |
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment