Commit ad4f06ae authored by Bruce Momjian's avatar Bruce Momjian

Improve documentation of signal usage for HAVE_SIGPROCMASK and

non-HAVE_SIGPROCMASK cases in pqinitmask().
parent b25bb4fd
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/libpq/pqsignal.c,v 1.38 2004/12/31 21:59:50 pgsql Exp $ * $PostgreSQL: pgsql/src/backend/libpq/pqsignal.c,v 1.39 2005/02/14 23:02:03 momjian 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
...@@ -75,7 +75,10 @@ void ...@@ -75,7 +75,10 @@ void
pqinitmask(void) pqinitmask(void)
{ {
#ifdef HAVE_SIGPROCMASK #ifdef HAVE_SIGPROCMASK
sigemptyset(&UnBlockSig); sigemptyset(&UnBlockSig);
/* First set all signals, then clear some. */
sigfillset(&BlockSig); sigfillset(&BlockSig);
sigfillset(&AuthBlockSig); sigfillset(&AuthBlockSig);
...@@ -126,6 +129,7 @@ pqinitmask(void) ...@@ -126,6 +129,7 @@ pqinitmask(void)
sigdelset(&AuthBlockSig, SIGALRM); sigdelset(&AuthBlockSig, SIGALRM);
#endif #endif
#else #else
/* Set the signals we want. */
UnBlockSig = 0; UnBlockSig = 0;
BlockSig = sigmask(SIGHUP) | sigmask(SIGQUIT) | BlockSig = sigmask(SIGHUP) | sigmask(SIGQUIT) |
sigmask(SIGTERM) | sigmask(SIGALRM) | sigmask(SIGTERM) | sigmask(SIGALRM) |
......
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