summaryrefslogtreecommitdiff
path: root/src/backend/bootstrap
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2001-01-14 05:08:17 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2001-01-14 05:08:17 +0000
commit36839c192706f5abd75bdcb02b6a7cace14ce108 (patch)
tree3022631b1208e1227684db86c12cbba7da15f611 /src/backend/bootstrap
parent027f144e390afa6f189270e8c2a2a56c0a88f646 (diff)
downloadpostgresql-36839c192706f5abd75bdcb02b6a7cace14ce108.tar.gz
Restructure backend SIGINT/SIGTERM handling so that 'die' interrupts
are treated more like 'cancel' interrupts: the signal handler sets a flag that is examined at well-defined spots, rather than trying to cope with an interrupt that might happen anywhere. See pghackers discussion of 1/12/01.
Diffstat (limited to 'src/backend/bootstrap')
-rw-r--r--src/backend/bootstrap/bootstrap.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c
index cd4186eec8..19b421a51d 100644
--- a/src/backend/bootstrap/bootstrap.c
+++ b/src/backend/bootstrap/bootstrap.c
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.102 2000/12/28 13:00:12 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.103 2001/01/14 05:08:15 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -329,9 +329,10 @@ BootstrapMain(int argc, char *argv[])
if (!IsUnderPostmaster)
{
- pqsignal(SIGINT, (pqsigfunc) die);
- pqsignal(SIGHUP, (pqsigfunc) die);
- pqsignal(SIGTERM, (pqsigfunc) die);
+ pqsignal(SIGHUP, die);
+ pqsignal(SIGINT, die);
+ pqsignal(SIGTERM, die);
+ pqsignal(SIGQUIT, die);
}
/*
@@ -383,8 +384,6 @@ BootstrapMain(int argc, char *argv[])
* abort processing resumes here
* ----------------
*/
- pqsignal(SIGHUP, handle_warn);
-
if (sigsetjmp(Warn_restart, 1) != 0)
{
Warnings++;