]> granicus.if.org Git - postgresql/commitdiff
Improve documentation of signal usage for HAVE_SIGPROCMASK and
authorBruce Momjian <bruce@momjian.us>
Mon, 14 Feb 2005 23:02:03 +0000 (23:02 +0000)
committerBruce Momjian <bruce@momjian.us>
Mon, 14 Feb 2005 23:02:03 +0000 (23:02 +0000)
non-HAVE_SIGPROCMASK cases in pqinitmask().

src/backend/libpq/pqsignal.c

index 3d470d105044b20df605d609b87b05fbbc983cd2..00bfecdc544052d9a12d166a90409e5c4a67fb8f 100644 (file)
@@ -9,7 +9,7 @@
  *
  *
  * 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
  *             This shouldn't be in libpq, but the monitor and some other
@@ -75,7 +75,10 @@ void
 pqinitmask(void)
 {
 #ifdef HAVE_SIGPROCMASK
+
        sigemptyset(&UnBlockSig);
+
+       /* First set all signals, then clear some. */
        sigfillset(&BlockSig);
        sigfillset(&AuthBlockSig);
 
@@ -126,6 +129,7 @@ pqinitmask(void)
        sigdelset(&AuthBlockSig, SIGALRM);
 #endif
 #else
+       /* Set the signals we want. */
        UnBlockSig = 0;
        BlockSig = sigmask(SIGHUP) | sigmask(SIGQUIT) |
                sigmask(SIGTERM) | sigmask(SIGALRM) |