]> granicus.if.org Git - postgresql/commitdiff
Clear QueryCancel and ProcDiePending at start of proc_exit, to ensure
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 7 Jan 2001 04:30:41 +0000 (04:30 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 7 Jan 2001 04:30:41 +0000 (04:30 +0000)
that leftover cancel/die requests cannot interfere with exit activities.

src/backend/storage/ipc/ipc.c

index b111e65cb06389c95525fd2ebe19310e58a4c571..d592a17986702c763876800fb89d2548a5115888 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.58 2000/12/30 01:20:55 tgl Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.59 2001/01/07 04:30:41 tgl Exp $
  *
  * NOTES
  *
@@ -126,6 +126,14 @@ proc_exit(int code)
         */
        proc_exit_inprogress = true;
 
+       /*
+        * Forget any pending cancel or die requests; we're doing our best
+        * to close up shop already.  Note that the signal handlers will not
+        * set these flags again, now that proc_exit_inprogress is set.
+        */
+       QueryCancel = false;
+       ProcDiePending = false;
+
        if (DebugLvl > 1)
                elog(DEBUG, "proc_exit(%d)", code);