From: Bruce Momjian Date: Mon, 14 Feb 2005 23:02:03 +0000 (+0000) Subject: Improve documentation of signal usage for HAVE_SIGPROCMASK and X-Git-Tag: REL8_1_0BETA1~1377 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ad4f06aeb25bb5115971eff566d036b0c820233e;p=postgresql Improve documentation of signal usage for HAVE_SIGPROCMASK and non-HAVE_SIGPROCMASK cases in pqinitmask(). --- diff --git a/src/backend/libpq/pqsignal.c b/src/backend/libpq/pqsignal.c index 3d470d1050..00bfecdc54 100644 --- a/src/backend/libpq/pqsignal.c +++ b/src/backend/libpq/pqsignal.c @@ -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) |