|
9 | 9 | *
|
10 | 10 | *
|
11 | 11 | * 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 $ |
13 | 13 | *
|
14 | 14 | * NOTES
|
15 | 15 | * This shouldn't be in libpq, but the monitor and some other
|
@@ -61,13 +61,35 @@ pqinitmask(void)
|
61 | 61 | #ifdef HAVE_SIGPROCMASK
|
62 | 62 | sigemptyset(&UnBlockSig);
|
63 | 63 | 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 |
64 | 73 | sigdelset(&BlockSig, SIGABRT);
|
| 74 | +#endif |
| 75 | +#ifdef SIGILL |
65 | 76 | sigdelset(&BlockSig, SIGILL);
|
| 77 | +#endif |
| 78 | +#ifdef SIGFPE |
| 79 | + sigdelset(&BlockSig, SIGFPE); |
| 80 | +#endif |
| 81 | +#ifdef SIGSEGV |
66 | 82 | sigdelset(&BlockSig, SIGSEGV);
|
| 83 | +#endif |
| 84 | +#ifdef SIGBUS |
67 | 85 | sigdelset(&BlockSig, SIGBUS);
|
68 |
| - sigdelset(&BlockSig, SIGTRAP); |
69 |
| - sigdelset(&BlockSig, SIGCONT); |
| 86 | +#endif |
| 87 | +#ifdef SIGSYS |
70 | 88 | sigdelset(&BlockSig, SIGSYS);
|
| 89 | +#endif |
| 90 | +#ifdef SIGCONT |
| 91 | + sigdelset(&BlockSig, SIGCONT); |
| 92 | +#endif |
71 | 93 | #else
|
72 | 94 | UnBlockSig = 0;
|
73 | 95 | BlockSig = sigmask(SIGHUP) | sigmask(SIGQUIT) |
|
|
0 commit comments